On my HA dashboard, I added a card for the TV room ceiling light. The issue is that it’s difficult to distinguish between the on and off states just by looking at the brightness bar.
I could enable “State Colour” and set it to yellow, for example, but then the brightness bar remains yellow whenever the light is ON, even if the actual light colour is blue.
What I’m trying to achieve is this:
If the light colour is white, the state colour should appear yellow. Otherwise, the state colour should match the current colour of the light.
The Tile Card does not support templating so you wont be able to do it directly.
There are custom cards that do allow templating and will be able to set color dependant on state.
Not really, just find another theme that is light but with more contrast.
Or change this theme to get more contrast.
I would not change this on a card by card basis, that will probably make it look strange
Specifically create a TLH that just copies all of the attributes of the real light:
On/Off
Brightness
HS Color
Initially I would exclude “Color Temperature” as that may cause issues.
Hence you would now have two lights that function the same (set either one and they would both update).
Then you can modify the TLH so that if the Saturation (of the HS Color) is 100% or close to 100% then change the reported/returned color to yellow.
You will likely have to play with it to ensure you don’t end up with yellow when trying to set white / maybe pick a specific shade of yellow which maps back to white. However something along those lines should work.