I ordered one of those 1-key Zigbee button… LINKIND ZB Button
I was able to get the button to work to turn on/off lights.
But I’m thinking of trying to get it to work with my smart FAN. My fan has 3 speeds, low, med and high.
Can you please assist me in creating an automation that for every button press it will go through those speeds one by one in sequence – low, med, high, off. Is this possible? I just don’t know how to start.
I have a zwave button and I use the following for an automation that steps thru the speeds on each button click.
I’m still on 2021.6.x so I can’t guarantee that it will still work when the new fan speed setting schema (removing the set-speed service) fully goes into effect.
- alias: Turn MBR Fan On With Scene Switch
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: zwave.mbr_scene_switch
node_id: 35
scene_id: 1
scene_data: 0
action:
- service: fan.set_speed
data:
entity_id: fan.master_bedroom_fan
speed: >-
{% if states('fan.master_bedroom_fan') == 'off' %}
low
{% elif states('fan.master_bedroom_fan') == 'on' and state_attr('fan.master_bedroom_fan', 'speed') == 'low' %}
medium
{% elif states('fan.master_bedroom_fan') == 'on' and state_attr('fan.master_bedroom_fan', 'speed') == 'medium' %}
high
{% elif states('fan.master_bedroom_fan') == 'on' and state_attr('fan.master_bedroom_fan', 'speed') == 'high' %}
low
{% endif %}