You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating an automation that runs at Home Assistant shutdown (or restart), setting an input boolean to a specific value doesn't work properly. Any input for that matter.
To test this: I did create a helper with input_boolean state set to off, no special configurations. I also created an automation to do the following
Push notification with the current state of an input_boolean helper
Change the value by calling service Boolean input: turn on
Push notification with the current state of an input_boolean helper
From the push notifications I see the value is changed, however not preserved after restart.
This also doesn't work with setting the value to off at first
What version of Home Assistant Core has the issue?
core-2022.8.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
alias: HA shutdowndescription: ""trigger:
- platform: homeassistantevent: shutdowncondition: []action:
- service: notify.mobile_app_medata:
title: "System shutdown part 1"message: >- Home Assistant is shutting down. State 1st is {{ states("input_boolean.recovery_state") }}
- service: input_boolean.turn_ondata: {}target:
entity_id: input_boolean.recovery_state
- service: notify.mobile_app_medata:
title: "System shutdown part 2"message: >- Home Assistant is shutting down. State now is {{ states("input_boolean.recovery_state") }}mode: single
The problem
When creating an automation that runs at Home Assistant shutdown (or restart), setting an input boolean to a specific value doesn't work properly. Any input for that matter.
To test this: I did create a helper with input_boolean state set to off, no special configurations. I also created an automation to do the following
From the push notifications I see the value is changed, however not preserved after restart.
This also doesn't work with setting the value to off at first
What version of Home Assistant Core has the issue?
core-2022.8.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
As discussed here: https://community.home-assistant.io/t/add-event-for-ha-restart-to-correctly-detect-power-loss/450087/20
The state preservation seems to happen before the event trigger?
The text was updated successfully, but these errors were encountered: