Hello, i would like to share my full configuration for the Dyson Pure cool Link Fans.
You will need 1 input_number and 2 automations to create the fan speed slider + 1 input_boolean, 2 scripts and 2 automations to creat the ‘oscillate button’.
###speed###
dyson_fan_speed:
icon: mdi:fan
name: Speed
initial: 1
min: 1
max: 10
step: 1
- alias: "Dyson Fan Speed From Input Boolean"
initial_state: on
trigger:
- platform: state
entity_id: input_number.dyson_fan_speed
condition:
condition: and
conditions:
- condition: template
value_template: '{{ (trigger.to_state.state | int) != (states.fan.salon.attributes.speed|int) }}'
action:
- service: fan.set_speed
entity_id: fan.salon
data_template:
speed: '{{states.input_number.dyson_fan_speed.state|int}}'
- alias: "Dyson Fan Speed From Component"
initial_state: on
trigger:
- platform: template
value_template: '{% if (states.fan.salon.attributes.speed|int) != (states.input_number.dyson_fan_speed.state|int) %}true{%endif%}'
action:
- service: input_number.set_value
entity_id: input_number.dyson_fan_speed
data_template:
value: '{{states.fan.salon.attributes.speed|int}}'
###oscillate###
fan:
name: Fan
initial: off
'1516402506314':
alias: Fan oscillate on
sequence:
- data:
entity_id: fan.salon
oscillating: 'true'
service: fan.oscillate
'1516402701204':
alias: Fan oscillate off
sequence:
- data:
entity_id: fan.salon
oscillating: 'false'
service: fan.oscillate
- alias: 'Oscillate On'
initial_state: on
trigger:
- platform: state
entity_id: input_boolean.fan
to: 'on'
action:
- service: script.turn_on
entity_id: script.1516402506314
- alias: 'Oscillate Off'
initial_state: on
trigger:
- platform: state
entity_id: input_boolean.fan
to: 'off'
action:
- service: script.turn_on
entity_id: script.1516402701204
The result should look like this:
Note the slider on the power fan line is from the custom_ui_state_card for light. It would be perfect to have the fan speed slider in this position and save one line, will look better.
I would to give a big thank Jer78, he’s the one behind the code.