Features Wishlist
Make Icon and Background Colours Template-able
What would you like to add
Allow the colour of icons and the background change depending on the state of an entity.
How this relates to Home Assistant
I currently have a number of sensors indicating the online/offline status of devices. In Home Assistant I have the following that that makes offline devices much more obvious on dashboards by making their icons bright red.
Would it be possible to change the icon colour (or background colour) based on an entity state?
homeassistant:
customize_glob:
"binary_sensor.*":
icon: mdi:console-network-outline
templates:
icon_color: if (state === 'on') return 'green';if (state === 'OK') return 'green';return 'red';
Pictures, mockups, or examples
No response
Before submitting
- I searched the existing issues and this has not already been requested
Discussion 1
Add a commentFigured out how to do this in
override.yaml, it's a bit "fragile" as it hard codes the tile id, but it seems to work.Original on GitHub