Home-Assistant-custom-components-Saver icon indicating copy to clipboard operation
Home-Assistant-custom-components-Saver copied to clipboard

Restore entities state after restart HA

Open look791 opened this issue 5 months ago • 0 comments
trafficstars

Hi, I installed and create this saver integration to save all binary_sensor states (everytime when whey they changed) like that:

alias: Sensory binarne - zapisz
description: ""
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.lumi_lumi_flood_agl02
      - binary_sensor.lumi_lumi_flood_agl02_2
      - binary_sensor.lumi_lumi_sensor_smoke_acn03
      - binary_sensor.lumi_lumi_sensor_magnet_aq2_otwarcie
      - binary_sensor.nightlight_8b7f_motion
      - binary_sensor.nightlight_8b7f_light
conditions: []
actions:
  - action: saver.save_state
    data:
      entity_id:
        - binary_sensor.lumi_lumi_flood_agl02_2
        - binary_sensor.lumi_lumi_flood_agl02
        - binary_sensor.nightlight_8b7f_motion
        - binary_sensor.nightlight_8b7f_light
        - binary_sensor.lumi_lumi_sensor_smoke_acn03
        - binary_sensor.lumi_lumi_sensor_magnet_aq2_otwarcie
mode: single

now I want to create an automation which restore latest stored state of entity when HA will started like that:

alias: Sensory binarne - przywróć
description: ""
triggers:
  - trigger: homeassistant
    event: start
conditions: []
actions:
  - action: saver.restore_state
    data:
      entity_id: binary_sensor.lumi_lumi_flood_agl02
mode: single

but it does not work, I saw that this service restore is depricated now

Image

how to configure it and where it should be applied to works like I described above?

It is possible to use this component to make and automation which always save and restore entities status when HA will be restarted?

the main purpose of that is to avoid reseting time counter below entity name in dashboard (latest changed) -> it will always restart when HA restarted

Image when this option is used

Image

look791 avatar Jun 02 '25 10:06 look791