My automation below will run a “sunset” script unless either of two other scripts are running.
What I want to be able to do is automatically have that script run once the other has finished. So, for example, if “sunset” doesn’t run because “match time” is already running, when “match time” ends I want “sunset” to run.
I’m not sure how to accomplish this so would welcome some advice please.
- alias: Sunset Living Room
trigger:
platform: sun
event: sunset
offset: '-00:30:00'
condition:
condition: not
conditions:
- condition: state
entity_id: script.match_time
state: 'on'
- condition: state
entity_id: scene.dining
state: 'on'
action:
- service: script.sunset_living_room