本帖最后由 ptlzx 于 2018-2-9 18:31 编辑
sonoff开关连接在吊顶的灯槽里,结构是:“物理墙开”--零火线--“sonoff”--零火线--“灯”,为了老人使用物理开关sonoff设置了PowerOnState 1,虽然解决不完美,但起码物理开关也可以用。最近加入小米人体感应触发这个sonoff灯,功能也正常实现。但是有一个怪现象:如果通过物理开关控制,每次通电打开后过几秒sonoff灯就熄灭了。原来物理开关可以控制开灯现在不行了,亮个两秒就熄灭。请大神们帮忙分析下问题出在哪?sonoff的参数是不是也得做一些修改。
- alias: switch.sonoff_4_on
trigger:
platform: state
entity_id: binary_sensor.motion_sensor_158d00016db923
from: 'off'
to: 'on'
condition:
condition: and
conditions:
- condition: state
entity_id: sun.sun
state: "below_horizon"
- condition: state
entity_id: switch.sonoff_4
state: 'off'
action:
- service: switch.turn_on
entity_id: switch.sonoff_4
- delay:
minutes: 1
- service: switch.turn_off
entity_id: switch.sonoff_4
|