本帖最后由 ptlzx 于 2018-12-1 11:00 编辑
小米无线开关控制sonoff,升级83后突然就不行了,autoations.yaml文件内容如下,不知道问题出在哪?
#单击
- alias: single_button
initial_state: true
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0001bf2271
click_type: single
action:
service: switch.toggle
entity_id: switch.sonoff_5
#双击
- alias: double_button
initial_state: true
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0001bf2271
click_type: double
action:
# service: switch.toggle
# entity_id: switch.sonoff_3
service: light.toggle
entity_id: light.yeelight_lights
#长按
- alias: hold_button
initial_state: true
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0001bf2271
click_type: long_click_press
action:
service: switch.toggle
entity_id: switch.sonoff_2
|