我貼一下我的給你參考
如果要達成按一下開燈一下關燈要用switch.toggle
- alias: "無線開關單擊"
trigger:
- platform: event
event_type: xiaomi_aqara.click
event_data:
entity_id: binary_sensor.switch_158d00028654ea
click_type: single
action:
- service: light.turn_off
data:
entity_id: light.yu_shi_dian_deng
- service: light.turn_off
data:
entity_id: light.xi_shou_tai_dian_deng
|