2022.12 Color states are broken/unusable

When it’s off, we have this :

color: var(--state-climate-off-color, var(--state-climate-inactive-color, var(--state-inactive-color)));

If you look at the priority order in the documentation :
state-binary_sensor-active-color > state-active-color

So even if you redefine state-active-color, it will be overridden by the state-binary_sensor-active-color (because this one if more precise) defined by default in home assistant default theme. You have to redefine state-binary_sensor-active-color.

Most domains have a custom active state color. The state active color is here as a fallback.

1 Like

That doesn’t work for me. I think the state is actually idle, not off, on my Tado integration. Could that be the problem?

Idle is not a valid mode for climate : Climate Entity | Home Assistant Developer Docs

And how do I change the color of a binary_sensor that is shown as lock/sound…?

state-{domain}-{device_class}-{state}-color
So
state-binary_sensor-lock-on-color
state-binary_sensor-sound-on-color

Did you look at the documentation ? Home Assistant Frontend - Home Assistant

1 Like

Huh? Yes it is a valid mode:

The state is based on this enum, it uses state-climate-heating-color when the furnace is on, so it should use state-climate-idle-color when the furnace is off.

Hvac mode is the state
Hvac action is an attribute

In entity, button and entities card, there is a special case for light and climate :

  • for light we use rgb color if available
  • for climate we use hvac action if available (mapped to climate state color)

So the right variable for your use case is state-climate-off-color. :slightly_smiling_face:

Here’s the mapping between hvac ACTION and hvac mode color :

cooling: state-climate-cool-color,
drying: state-climate-dry-color,
fan: state-climate-fan_only-color,
heating: state-climate-heat-color,
idle: state-climate-off-color,
off: state-climate-off-color,

Hi,

So what am I missing?
Why does this not work in my Theme

state-group-active-color: var(--amber-color)

But this does

paper-item-icon-active-color: var(--amber-color)

As @Flavien has asked but has been ignored, Why do some domains work and others don’t and why does paper-item-* still work when it is documented to have been depreciated?

Is this related to my experience in 2023.2 of the stock Light card using the default theme that some entities’ icons don’t change colour according to their state?

For example I have a Hue group that, in the light card, the icon shows inactive (blue grey) but when on or 50% bright, shows black. But an individual hue bulb in a Light card, the icon shows its colour and state.
My Magic Home LED lights work ok but my tuya light entities don’t.
If I use a Button card or Entities card then the icon behaves as expected.

Well ok, I can see it’s supposed to work like this, but something is obviously broken because I don’t have any color CSS when the HVAC is in idle state:

Hi,

Any solution to hiding the Assist icon?
I would appreciate being able to turn it off for certain views.

Thanks

Please don’t hi-jack an already too long conversation with a question that has nothing to do with colours.

1 Like

Sorry - just replying to a question already asked in this blog!
I realise it was off topic but it had already been asked.

No it does not! And I see you just helped someon in the main 2023.2 thread and it did not work for him either without the –

The undocumented –

1 Like

I think perhaps you may have misclicked, this is a single issue thread sparked from a long discussion from December updates.

The question you asked is related to the February update, whose thread lives here: 2023.2: How can I Assist?

Not to derail the discussion which is about the colour aspect of the card

But the card seems harder than it is.

The big job is to draw the ground place of the house. I used an app on my iPad and entered the real measurements and exported it as a picture.

The rest is actually simple. And hard.

Simple as in - if you followed the original documentation, you can add your entities. It takes time to get the x,y coordinates right but it quickly makes sense and you can see the result live as you type the numbers. I can recommend trying it. You can make some pretty cool things that no other card can do. And it impresses when you show it to your friends and colleagues.

This as the post I was responding to.
As you can see it is in this blog.
However you are correct, it is off topic for which I have apologised, But so was the original by a well respected member of this community and I was merely responding to the original post asking for an update.
Again I apologise for responding to the post.

1 Like

How do we find out what is defined in the home assistant default theme? Where can we see the theme source?

Indeed, but it’s missing the on/off state. I’ve found what I wanted digging into the code frontend/ha-style.ts at e6de8ec94d15b7f94887aa4e25b3a7898a693a89 · home-assistant/frontend · GitHub