I would like to use variables to store the state of lights (on or off) at the beginning of an automation to be able to restore the state at the end.
Because I want to send some effects to my lamps and I think this is only possible with light.turn_on, and this will always turn on and depending on the current state sometimes I need to turn off. And I want to avoid to define to different automations depending on the current state but this be one automation.
I found this: https://github.com/rogro82/hass-variables and it looks like this is what I could use.
So I added this address under Menu > Hass.io ADD-ON STORE > Repositories: https://github.com/rogro82/hass-variables
itâs name is shown as âunknownâ and I am not sure if this is the right way to add this component.
Anyway I canât use it, if I add a section âvariableâ to my configuration.yaml and check the configuration I get:
âComponent not found: variableâ
Is my way to use this component wrong? Maybe it is not possible to use it in hass.io, but only in the hass without the âioâ?
Are there other easy ways to store the state of a light at the beginning of a group of actions to be able to use it at the end of these actions?
Thank you, this was not clear for me. I did not understand from the instructions that I should / could add this folder in my config folder because I have no such folder.
FWIW, I created a python_script to save/restore lights & switches. Itâs described in this topic, and can be obtained from here. If you think this might help you, and you have questions, just let me know.