Hi all I have an automation turning on my light switch when I open the door and come home.
Where I exit home and I turn off light and the open the door the light turns on…how can I say to the automatism not to turn on the light if it has benne turned off few seconds before? My automation is…
alias: Accensione luce corridoio
trigger:
entity_id: binary_sensor.door_window_sensor_158d00033a9289
from: 'off'
platform: state
to: 'on'
condition:
condition: and
conditions:
- condition: sun
after: sunset
- condition: time
before: '22:30:00'
action:
entity_id: scene.a5ak97silusytapx
service: scene.turn_on