Добрый вечер. Есть проблема и не пойму почему....
- id: corridor_light_on_motion
alias: Corrior light on motion
initial_state: true
trigger:
- entity_id: binary_sensor.motion_corridor
platform: state
to: 'on'
condition:
- condition: template
value_template: "{{ state_attr('binary_sensor.motion_corridor', 'illuminance') < 100 }}"
action:
- service: switch.turn_on
data:
entity_id: switch.plug_corridor
простая автомация но сробатывает только если стейт меняется с false -> true