2022.12 Color states are broken/unusable

Thanks to others for doing the hard work. I’ve done a bit of tweaking to include descriptive colours and also remove the duplication for light and dark modes. Also for those who are not familiar with using themes and to try and summarise everything into one place, here are some hopefully simple instructions that everyone should be able to follow fairly easily and save having to read the entire thread if just looking for as close as I feel we can currently get to a solution. Note, as far as I can tell, certain things can’t be reversed currently e.g. locks are only coloured when locked and not when unlocked as there is no state-lock-unlocked-color to set it to amber and there is no state-alarm-disarmed-color to set it to green.

Place the following in configuration.yaml:

frontend:
  themes: !include themes.yaml

For 2022.12.0 to 2022.12.3, create a themes.yaml file in your config directory and copy the following into it. For 2022.12.4, see the updated themes.yaml contents here.

Classic:
  state-default-color: '#44739E' # Blue-Grey
  state-alarm-armed-color: '#F44336' # Red
  state-alarm-arming-color: '#FF9800' # Orange
  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-color: '#FFC107' # Amber
  state-binary-sensor-alerting-color: '#F44336' # Red
  state-calendar-color: '#2196F3' # Blue
  state-camera-color: '#2196F3' # Blue
  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: '#BDBDBD' # Disabled (Light 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-media-player-color: '#3F51B5' # Indigo
  state-person-home-color: '#4CAF50' # Green
  state-person-zone-color: '#2196F3' # Blue
  state-remote-color: '#2196F3' # Blue
  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: '#BDBDBD' # Disabled (Light 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' # Blue-Grey
    dark:
      state-default-color: '#44739E' # Blue-Grey

I have changed the colour of state-lock-locked-color from red to green on my latest edit, as, for me at least, it makes more sense to be green than red, indicating all is OK and it’s locked.

As with all the colours you can copy and paste them to each variable to suit your needs. e.g. if you want covers to no longer be the new Purple colour and the default Blue-Grey, change state-cover-color: '#9C27B0' # Purple to state-cover-color: '#44739E' # Blue-Grey. As mentioned previously, we can’t quite revert everything to exactly how it was before, but this does allow us to get pretty close and certainly to a more useable state, in my eyes at least.

Next, create a new automation to load the Classic theme on startup for all users:

# Set the default theme to Classic
- id: A550734A-8AAC-4436-AF15-8193FAF984D5
  alias: "System: Set default theme to Classic"
  trigger:
    - event: start
      platform: homeassistant
  action:
    - service: frontend.set_theme
      data:
        name: Classic
        mode: light

Subsitute dark into the automation in place of light if you would rather have dark mode set. Note you may also need to set your theme to Backend-selected in your profile if you have changed this previously.

Lastly, restart Home Assistant.

Also, for easy reference, I’m duplicating here a couple of useful links to the state entity colours and state entity colour variables.

51 Likes