这样改确实更合理,请教下这个判断灯状态的语句怎么写,加哪里?
- alias: switch.sonoff_4_on
trigger:
platform: state
entity_id: binary_sensor.motion_sensor_158d00016db923
from: 'off'
to: 'on'
condition:
condition: numeric_state
entity_id: sensor.illumination_7811dca47fae
below: 200
action:
- service: switch.turn_on
entity_id: switch.sonoff_4
|