#What's the best strategy for storing device states for future restoration?

1 messages · Page 1 of 1 (latest)

polar pond
#

I'm trying to figure out the best way to save device states so I can restore them later. For example, an automation that turns everything off when I leave the house, then turns back on only the devices that were on before when I get back. Currently, I'm doing this with input booleans, but it's not ideal since I need to maintain one for each device, create them manually, and can't store complex states (such as an AC setup with temperature, mode, etc.).

How can I do this most efficiently? Is there a way to get a full "dump" of a device's states and then apply it later?

coral venture
#

you can create a snapshot of as many entities as you want in a scene.
so you would have an automation that

trigger on leaving
create scene to store all devices states
turn off all devices

then separately
trigger on arriving
activate scene that has the states stored

#

some devices may only need 1 entity and others might require multiple. so you can work that out on a device by device state

polar pond
#

ohh I see! you create the scene programatically, of course

coral venture
#

yup and because its a fixed ID it will overwrite the old one

#

scenes are pretty powerful but take a bit of learning in parts

polar pond
#

that's exactly what I was looking for

polar pond
#

now it clicked what scenes are for, thank you very much! <3