Hi,
I am trying to create an automation for a wireless switch that allows me to change the power on-off of a Mi Smart Pedestal Fan by pressing the same button, can It be done?
Unlike new model fan or light, the “Action” for this fan is only either “turn_on” and “turn_off”, there is no “toggle” action available. Thanks in advance.
@rytilahti
@syssi
alias: 'Baobei Bedroom: Wireless Switch - Right Button - Single Press - Fan On Off'
description: ''
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.wall_switch_right_158d000313xxxx
click_type: single
condition: []
action:
- device_id: f0400c0cfa7643895249acc3xxxxxxxx
domain: fan
entity_id: fan.zhimi_fan_v2
type: turn_off
mode: restart