Saving data somewhere to access it later

Hello!

I want to save the state of multiple entities at once and then reload the states back in later. Anyone has an idea on how to accomplish that? Is there some option to save data?

Greetings,
Pingu

I think you basically have 2 options:

  1. Use an automation to create a scene (action: scene.create) for these devices and recall the setting from within scene by activating it later. Next time round just do the same.
    Best, if all your device states should be saved at the same point in time.
    Example: Save at 6PM and recall at 9PM the state of all lights and light switches in the living room.

  2. Create a helper for each device state you want to save, apply the state to it when it needs to be saved and apply it back to the device when it’s supposed to be reset.
    Best, when you need to save the device states at different pint in time.
    Example: Save at 6PM and recall at 7PM the state of one light switch, save the state of another slight switch at 6:30PM and recall it at 8:30PM.

Keep in mind that this does not work for most sensors, e.g. it will always have the value overwritten by the temperature senor itself.