I know this has been asked many, many times, and that it has many, many solutions. I’ve scoured the net, but every solution I tried didn’t do what I hoped for my specific use case .
I’d like to change the icon color of an entity (including in configuration.yaml template, such as sensors) based on a certain situation/state/input/etc…
And what I’m asking is not changing the color on a card. It’s more like changing the “ON” color of a light from yellow to green, for example.
I’m asking this because a card color change won’t be transmitted to external hardware. I’m using stream deck and I’d like the color change to be sent to it
I know this can be done because of this: .Font color for Entity (custom icons) in "on" state always resets to white · Issue #270 · cgiesche/streamdeck-homeassistant · GitHub
Does anyone know how to achieve this, including using themes, state colors, or anything else, probably at the backend as opposed to the frontend??
P.S. Please bear in mind that I’m not an expert in yaml. I’ve only changed configuration based on tutorials and you guys’ help.
Thanks
Update: I installed Custom UI (not recommended - being phased out) and managed to change the icon color on the dashboard. This change, however, did not translate to Stream Deck
Update#2:
Found the solution, for anyone looking:
- Make a yaml file that you can access raw on the web.
Example: https://raw.githubusercontent.com/cgiesche/streamdeck-homeassistant/refs/heads/master/public/config/default-display-config.yml
As you can see, it displays nothing but the yaml text; no menus; nothing. Make sure you name it “.yml” instead of “.yaml”. I used github for this, and I tell Stream Deck to access the raw github file (hint: github prvides a “raw” tab for files - you can see the link I provided starts with the word “raw”.)
-
The yaml file you create should include the text shown in the yaml example above. This is the default configuration for Stream Deck Home Assistant plugin as provided by the developer. You can just copy and paste it into the yml file you created.
-
Edit what you need and save your changes. For this you have to know how yaml works in Home Assistant.
-
In Stream Deck Home Assistant buttons there’s a field captioned “Custom display configuration URL”; in that field paste a link to the yaml file you created.
-
Click “Save and reconnect” and you’re done!!
Alternative method :
See this: Customization of Home Assistant plugin in Stream Deck