Hi there! First time commenter, long time user and fan of AppDaemon and HomeAssistant. I have a small conundrum about how to store state using AD, hope that someone can give me a hand.
I have three lights and a zigbee remote in the living room, this remote has 5 buttons reserved to store and restore states, and I use AppDaemon to handle all zigbee actions related to the remote.
My aim is, when I long press a state button, I want to store somewhere the state of all three lights as they are in that moment , and when I short press the same button, I want to restore the lights to that previous state.
Now, my question is “where and how to store that state?”. For other automations, I create a sensor or whatever in HA (statically in the .conf files if I want the state to persist across HA reboots, or dynamically in AppDaemon, if I don’t need that). However, this time, I feel like creating 15 different virtual lights in my conf files is a terrible hack. Ideally I would like to do something programmatically in AppDaemon. Does someone have a better idea?
I could be convinced to use the AppDaemon namespaces. However, I don’t like it much from the aesthetics POV (state should be a HA thing). Also, the last time I tried to use them, it worked well for a while, and then an update to AppDaemon hosed my whole system until I managed to work out that the issue was in the namespace I was storing state in, so after some hours of very frustrating debugging, I deleted the namespace and never looked back.