I’ve got a “light” of platform “rgb” (an analog LED strip). It’s state has an on/off switch, brightness and color. I would like to reduce it to a binary light with just on/off as state, and brightness+color hardcoded/static. Is that possible?
I’d like the light appear with just an on/off switch in the dashboard, just like a light of platform “binary”.
I wonder if there is something like a binary light, that amends it’s own on/off state with a couple of static values (brightness+color) and proxies it to the existing rgb light?
I think there are few ways to do that. What’s the reason for that? Some aesthetic thing or there is some functional aspect?
You could for example set the current RGB light as internal.
Then create new binary light that is linked to dummy gpio output (no function).
Then create on_turn_on automation on that binary light to turn on RGB light with static color/brightness. And lastly on_turn_off automation to turn RGB off.
You follow me?
One reason is modularization. I want it to behave close to my other simpler lights, which can only be switched on and off. That way, I can reuse code, e.g. in automation.
The other reason is state can be corrupted, e.g. via the dashboard by some careless user, whereas hardcoded data can’t.
Yes, I’m following you, thanks! Will try it out. What are the other ways to do it?