I have been running an automation for years that turns off all lights , heating down etc if everyone has left the house. However I also have a automation that turns on some lights when no-one is home when it het dark (sunset -10min).
Individually they work fine. However when I leave the house after it’s dark, all lights go out. As the ‘evening lights on automation’ has already triggered, it will not trigger again.
I think the simplest way to solve this is call the automation trigger service for the ‘evening lights on’ automation from my ‘away’ automation. However I will need to add a condition (as the trigger time has already past).
Can I add a condition to an automation that is identical to the trigger?
So change for example current:
- alias: Evening_on
trigger:
platform: sun
event: sunset
offset: "-00:10:00"
action:
service: scene.turn_on
entity_id: scene.evening_on
Into:
- alias: Evening_on
trigger:
platform: sun
event: sunset
offset: "-00:10:00"
condition:
platform: sun
event: sunset
action:
service: scene.turn_on
entity_id: scene.evening_on