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?