State colors for locks, and general customization of state colors?

I could be wrong, but I believe this problem just appeared after installing the 2022.21 release which added some new color functionality to the tile card…

On my dashboard I have a few button cards that show my helper groups for “all locks” and “all doors”, so I can quickly glance and see if everything is closed and locked. Now for some reason when my doors are locked, the icon turns red, and then it goes back to white when the doors are unlocked. At least to me this seems backward - I’d like the color red to represent something was left unlocked.

Then the card for all doors seems to show white when all doors are closed, but blue when a door is open. Is there any way to just have the following for state coloring?
Unlocked: White
Locked: Red
Closed: White
Open: Red

Or is my only option to ditch the built-in button card and start experimenting with a custom button card? Thanks!

This is not a suitable approach. I don’t want my doors and windows to be safe or whatever, but open/closed.

Not sure what you are on about.This question was about colour. Which you can change as per my link.

I agree with @jimmyz80 that the new colors are not ideal. Red should be used when something requires attention and a locker should require attention when it is NOT locking, so red should be used for unlocked.


With changing the device class, the state of my doors/windows is not open/closed anymore.

Creating another custom theme with

  rgb-state-binary-sensor-color: 255, 0, 0 
  rgb-state-group-color:  139, 195, 74

solved it for me.

Ah, right. Now I understand, yeah I only meant to point out that you can change the colours to what you want with themes. I missed the state_class bit of Marius’ post. Looks like you worked that out though.

1 Like