Restore last state


Need help

Environment: pi4 hassio 0.107.7

I have generic_termostat, and manual alarm panel,

After power off/on the pi, the last states not restoring

Thank you

let’s not mix thermostats and alarms, shall we?

generic thermostat restores its target temperature if configured properly. or what’s your issue?
please post your config and tell us more so we can help.

when I restart the hassio, generic_thermostat and alarm_control_panel are restoring, but when I power off the PI , and power on it again , the state state not restoring

Configure a default setup of Home Assistant (frontend, api, etc)



Uncomment this if you are using SSL/TLS, running in Docker container, etc.



Text to speech


  • platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include sensor.yaml
camera: !include camera.yaml
binary_sensor: !include binary_sensor.yaml
switch: !include switch.yaml

purge_keep_days: 3
purge_interval: 3
db_url: mysql://homeassistant:************@core-mariadb/homeassistant?charset=utf8

- /tmp/
- /config/

  device_class: door 


  • platform: manual
    name: Home Alarm
    code: 1234
    pending_time: 15
    delay_time: 20
    trigger_time: 4
    trigger_time: 0
    pending_time: 0
    delay_time: 0


  • platform: generic_thermostat
    name: Study
    heater: switch.switch_heating
    target_sensor: sensor.living_room_temperature
    min_temp: 15
    max_temp: 30
    ac_mode: false
    #target_temp: 27
    cold_tolerance: 0.3
    hot_tolerance: 0
    seconds: 30
    minutes: 3
    initial_hvac_mode: ‘heat’
    away_temp: 16
    precision: 0.1

Yes that is how it works.

It would be like unplugging a physical alarm system’s power. It would forget too. This is why they have backup batteries.

Please see the sticky post about how to format code so we can see what you’re doing.

Dear Tinkerer

I did how wiriten in doc, and when I restart the assio supervisor the state restoring, bat when I power off/on the raspberry pi, the state not restoring, and I want to understand dose it normal? or I need write some automation for restoring state.

Thank you

For the second time, yes it is normal. If you power off the server it will forget everything. If you only restart it should remember.

You didn’t format your post correctly. What you posted was a mess that makes it hard to help you.

Others have answered that, more than once.