2022.12 Color states are broken/unusable

If we were talking about colours of the general user interface then yes.

But this is not about font colours, or colours of headers or dialogue boxes.

The issue is FUNCTIONAL colours. It is colours that reflects the state of entities in the UI. And not only the standard UI but also the UI that I have spent hours defining the way I want them.

We have every reason to be a grumpy bunch because our dashboards that our families use in their daily life are totally functionally broken unless we constantly spend hours trying to fix it back.

8 Likes

And the answer doesn’t help anyone. You said the exact same thing basically in the release thread replying to no-one. At this point it seems like you’re trying to start a witch hunt. Stop. As you can see, your comment already started another argument for what good? None.

Stick to the topic at hand: Getting the colors and issues fixed.

3 Likes

?
I didnt want to at all.
I was merely trying to illustrate the fact the issues have increased after the beta, so that would explain to some extent the intensity increase in issues.

Dont read anything personal in my post please, as I said, not my intention at all

1 Like

Yes we realize it’s just colors, however to many this is a large problem. Lets try not to downplay issues others are having.

Everyone here should be focused on finding and presenting issues. Lets try to keep all the arguing to a minimum.

Thanks.

4 Likes

looks like the issues have been fixed (reversed) with 2022.12.4

Here’s the updated themes.yaml for 2012.12.4 from my earlier solution, which takes into account the new variables in 2012.12.4 and ‘partially’ restores the green state to the alarm when disarmed (the icon doesn’t show green, but the Alarm Control Panel does) and sets armed to red.

Given a few more things have ‘broken’ in this release (e.g. the locked state of a lock no longer respects the green colour set in the variable), I suspect there may be a chance that this needs to be updated again when the next patch is released. I’ll update the original post/solution with a link to here for now, as it seems to be a bit of a moving target at the moment. Hopefully I will be able to update the original post fully once things settle down a bit.

Classic:
  state-default-color: '#44739E' # Default (Slate-Grey)
  state-alarm-armed-color: '#F44336' # Red
  state-alarm-arming-color: '#FF9800' # Orange
  state-alarm-disarmed-color: '#4CAF50' # Green
  state-alarm-pending-color: '#FF9800' # Orange
  state-alarm-triggered-color: '#F44336' # Red
  state-alert-color: '#F44336' # Red
  state-automation-color: '#FFC107' # Amber
  state-binary-sensor-alerting-color: '#F44336' # Red
  state-binary-sensor-color: '#FFC107' # Amber
  state-calendar-color: '#FFC107' # Amber
  state-camera-color: '#FFC107' # Amber
  state-climate-auto-color: '#4CAF50' # Green
  state-climate-cool-color: '#2196F3' # Blue
  state-climate-dry-color: '#FF9800' # Orange
  state-climate-fan-only-color: '#00BCD4' # Cyan
  state-climate-heat-color: '#FF5722' # Deep Orange
  state-climate-heat-cool-color: '#FFC107' # Amber
  state-climate-idle-color: '#8A8A8A' # Off (Mid-Grey)
  state-cover-color: '#9C27B0' # Purple
  state-fan-color: '#00BCD4' # Cyan
  state-group-color: '#FFC107' # Amber
  state-humidifier-color: '#2196F3' # Blue
  state-input-boolean-color: '#FFC107' # Amber
  state-light-color: '#FFC107' # Amber
  state-lock-jammed-color: '#F44336' # Red
  state-lock-locked-color: '#4CAF50' # Green
  state-lock-pending-color: '#FF9800' # Orange
  state-lock-unlocked-color: '#F44336' # Red
  state-media-player-color: '#03A9F4' # Light Blue
  state-person-home-color: '#4CAF50' # Green
  state-person-not-home-color: '#9E9E9E' # Grey
  state-person-zone-color: '#2196F3' # Blue
  state-remote-color: '#FFC107' # Amber
  state-script-color: '#FFC107' # Amber
  state-sensor-battery-high-color: '#4CAF50' # Green
  state-sensor-battery-low-color: '#F44336' # Red
  state-sensor-battery-medium-color: '#FF9800' # Orange
  state-sensor-battery-unknown-color: '#8A8A8A' # Off (Mid-Grey)
  state-siren-color: '#F44336' # Red
  state-sun-day-color: '#FFC107' # Amber
  state-sun-night-color: '#673AB7' # Deep Purple
  state-switch-color: '#FFC107' # Amber
  state-timer-color: '#FFC107' # Amber
  state-update-color: '#4CAF50' # Green
  state-update-installing-color: '#FF9800' # Orange
  state-vacuum-color: '#009688' # Teal
  modes:
    light:
      state-default-color: '#44739E' # Default (Slate-Grey)
    dark:
      state-default-color: '#44739E' # Default (Slate-Grey)

# UNUSED COLORS
# '#E91E63' # Pink
# '#3F51B5' # Indigo
# '#8BC34A' # Light Green
# '#CDDC39' # Lime
# '#FFEB3B' # Yellow
# '#795548' # Brown
# '#607D8B' # Blue-Grey
# '#BDBDBD' # Disabled (Light Grey)

Here’s the link to the updated (for 2022.12.4) state entity colour variables, off which this is based.

5 Likes

You should be able to update your post indefinitely. I update some of my old bookmarked posts ~3 or ~4 years after the fact on a regular basis when things are updated or changed.

I’m intentionally trying to keep it partially separate for now, with links in both directions, as not everyone will necessarily have updated to 2022.12.4. Once things settle down and we have a more ‘final’ solution, I will fully update the original post with the latest yaml.

3 Likes

So let’s sumarize.
Devs introduced rgb prefixed color variables, where rgb indicates the need of using list of values instead of CSS color methods (#/rgb/rgba/hls/etc)

So, not only they cannibalized CSS, they did it in an inconsistent way (there are still lot of color variables that allow using CSS methods, see link above) and on top of this they introduced names that are dependent on a current framework limitations. Arent’ there any reviewer who can stop doing such antipatterns?
I guess we can expect another clusterf* in a year or two because names of those variables will likely change again (if they decide to improve the approach, for example allowing again use of CSS methods for those colors)

Color variable names have to remain technology agnostic. Shouldn’t contain information about the way how colors are being set, or what color model is used for that. --rgb-state-climate-heat-color should be --state-climate-heat-color instead

Please correct me if I’m wrong.

7 Likes

Thanks for keeping it updated. Do you know if we can specify in theme colors for various device classes? E.g. binary_sensors now have different colors depending on class (as per the page you’ve shared earlier) e.g. connectivity, problem etc. Is there a particular naming convention for that?

I believe the only variables that exist are what you see in the state entity colour variables, which are all duplicated and modified to some extent in my themes.yaml. You can change any of them to whatever you want though, just not ones that don’t exist (yet). :slight_smile:

OK, clear thanks! So need to watch changes in this file

Hmm. You are right. After looking into changes history, there were several rgb variables year ago already.
Not sure how important and how widely were used.
But now they introduced a lot of them for specific devices/entities and their states. So the impact will be huge once they change the approach.

If you’ve been paying attention to the thread, you would have found out that the goal is to have supported variables so this doesn’t happen again. That was mentioned posts ago.

1 Like

Does it mean that those just introduced variables’ names are about to be sanitized yet?

Yeah, I read the whole thread but have no impression it’s going to change the way you say. But maybe I missed something.

I have no idea, the supported variables haven’t been released yet.

1 Like

I just proposed in one of the issues about zone colors to make the frontend code also look for variables that contain the entity-id, optional but with higher precedence than the domain specific variables.

This would allow for

state-person-zone-work-color: 'red'
state-person-zone-church-color: 'yellow'
state-person-zone-golf-color: 'lightGreen'
state-person-zone-color: 'blue'     # all other zones

When it does not find a matching variable for a certain entity it would fall back to the more generic domain color. This could be done for all domains, not only zones, it would create a zillion possible variable names and allow every entity to have its own set of colors (and by the same mechanism maybe even different colors for history and entity card), but none of them needed to be defined, it would be completely optional, it would always fall back to the next more generic variable in the hierarchy (ideally all the way back until it arrives at the theme accent color).

I would love something like this implemented. Then also a lot of the new default colors could be removed again and it would simply fall back to the old default colors. This would end all discussions, be 100% backwards compatible and would still allow complete theming of everything.

2 Likes

Great!
But unfortunately history graph for binary_sensors (and as I see, for binary_sensors only but not for switches, lights etc.) uses the same color for both “on” and “off” states. This color may be amber or red depending of device_class, but it does not change depending of state.

1 Like

It’s a bug, already fixed, will probably be in the next release.

4 Likes

I ran across this thread when I updated yesterday (first time in a few weeks) and many of my icons changed colors. Not that they are unpleasant, but it was unexpected - some are improvements. What I really came here to find out is how to change them because they don’t all make sense, and it seems like the only current fix is to hack through it. I hope that HA puts in a system to change these colors easily via the UI rather than forcing us to do a lot of YAML hacks to get the job done.

Forced color changes aren’t friendly to custom UI’s, I don’t feel they should be just set for me and then done, I would rather there be an option “hey, now you can easily set icon colors via the entity setup”. RGB bulbs that are bright white that a few updates ago started being reflected in the icon was a bad decision, it should be configurable, since a white icon on a white background is impossible and I don’t like using night themes just because the software forces me to via it’s color scheme.

HA is growing by leaps and bounds daily, I think more thought needs to be put into these types of forced changes in order to consider how users would react to a forced change (and there have been quite a few of those lately) versus giving them a simple method to implement a new shiny feature themselves if they choose to.

5 Likes