Enhancing Home Assistant Themes with Entity-Specific Colors #25584
Unanswered
LeeroysHub
asked this question in
Dashboard
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Enhancing Home Assistant Themes with Entity-Specific Colors
Home Assistant's built-in theming system allows for domain-level color customization, but it doesn't natively support assigning colors to individual entities. To improve this, I modified the frontend code by introducing additional CSS variables for entity-specific theming.
The Proposed Change
In
domainStateColorProperties.ts
, I added:And updated the properties.push array to include:
This enables themes to define colors per entity, removing the need for workarounds like card-mod for styling entity states. To change an entity, you can add an entity specific variable to your theme such as:
Benefits
Beta Was this translation helpful? Give feedback.
All reactions