I have a very nice light that I control via an RF remote, or in my case, HA and sonoff rfbridge.
I would very much like to save the state of the light, as it can change color, and have different effects in it.
So of course I have a light defined that can turn on and off.
And that stores the on/off state, but it also has a lot of color settings and I don’t know how to save that?
I’ve made a panel for controlling the light, which mimics the remote control:
And the ‘on’ button is of course reacting on the state of the light but I would very much like to have the ‘color buttons’ react as well, but that requires that I have a ‘state’ somehow I can use.
The light doesn’t report a status, it’s a status I have to set when one of the commands are sent to the light.
So my idea was to use the existing panel, so that when I do the call-service, it also sets a status for the light.
Of course this will not work if the lights own remote is used, but that’s a negligeble problem for me
An automation triggers on the input_boolean turning on, it’s actions are to send the command.
Your button can then use the input_boolean state to change it’s appearance.
You could perhaps use only one automation that triggers on all the input booleans, then use a template to select the correct command to send. Or use an automation for each input boolean (easier to understand, but requires more configuration).
For those still wanting to accomplish this without jumping through too many hoops.
You can make use of scenes to save the state beforehand and then reapply it when you want to revert back to the previous state. Better than creating many inputs in the config. Can save the state of many entities in one go.