傻傻的每分钟自动开关一次,导致灯不停地打开。求助哪里错了?8266我也换了一块
#1 EPS-8266-01(一楼门磁)
- platform: mqtt
name: "1Fdoor"
state_topic: "/1F-ESP2/menci/Switch"
qos: 0
payload_on: "1"
payload_off: "0"
device_class: opening
自动化操作
#一楼门磁开灯
trigger:
platform: state
entity_id: binary_sensor.1fdoor
from: 'off'
to: 'on'
action:
service: light.turn_on
entity_id: light.sl1
- alias: sl1 door off
#楼梯体感2分钟无人关灯
trigger:
platform: state
entity_id: binary_sensor.1fdoor
to: 'off'
for:
minutes: 2
action:
service: light.turn_off
entity_id: light.sl1
|