Restoring the status of running automations after restart/update #1927
Replies: 1 comment
-
You can create one automation that has multiple triggers with different IDs. Here is an example of such automation that uses a timer to wait for the light to turn off. alias: Motion-Activated Hall Light
description: >-
Turn on hall light when motion is detected and turn it off after 2 minutes of
inactivity.
triggers:
- trigger: state
entity_id: binary_sensor.motion_hall
to: "on"
id: motion_on
- trigger: event
event_type: timer.finished
event_data:
entity_id: timer.hall_light
id: timer_done
actions:
- choose:
- conditions:
- condition: trigger
id: motion_on
sequence:
- action: light.turn_on
target:
entity_id: light.hall
- action: timer.start
target:
entity_id: timer.hall_light
data:
duration: "00:02:00"
- conditions:
- condition: trigger
id: timer_done
sequence:
- action: light.turn_off
target:
entity_id: light.hall
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the feature
I would like automations to continue where they left off after an update whenever possible. For example, I have an automation that runs for half the day, but spends most of the time waiting for triggers such as a specific time. If an update is installed during this time, the flow is interrupted.
Use cases
For example, a light that is switched on in the evening, switched off overnight, and switched on again in the morning will remain on permanently if the update is installed in the evening after switching on, while waiting for the switch-off time.
Current workarounds
I turn the light on and off manually when I install an update. Alternatively, I could create a separate automation for each step to make it stateless, but that would clutter up my automation list, and unfortunately there are no folders for organizing automations.
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions