On my Dashboard I want to show the icon of a light entity always in white when it is turned on. I worked through different posts but couldn’t get it to work. At the moment the icon shows the current light color.
Another problem is that I want a binary_sensor to be black when the status is “off” with an opacity of 0.2. I didn’t get the opacity to work based on the status.
Hello!
If you would like ALL lights to be white when on and ALL binary_sensors to be black and faded when when off, then I recommend a custom theme: Home Assistant frontend - Home Assistant
If you’d just like to have these things apply on these specific cards, you can try something like this:
Important Information about Example 2:
This example uses two conditional state-icons in order to apply the opacity only when the sensor is off. This may not be the most elegant solution (and probably won’t work if the sensor is unknown or unavaliable) but it should help you get closer to a solution.
Thank you. Conditional works perfect for all kind of entities (binary_sensor, input_boolean, input_number,…) but not for light entity. I couldn’t get the icon only shine white.