Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The color of binary sensors never changes (regardless of state) #14701

Closed
3 tasks done
smonesi opened this issue Dec 11, 2022 · 6 comments · Fixed by #14735
Closed
3 tasks done

The color of binary sensors never changes (regardless of state) #14701

smonesi opened this issue Dec 11, 2022 · 6 comments · Fixed by #14735

Comments

@smonesi
Copy link
Contributor

smonesi commented Dec 11, 2022

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.

Describe the issue you are experiencing

Starting from 2022.12, the color of the icon of a binary sensor (eg. a motion sensor) is always the same color, even ifs state changes (unlike shown here: https://www.home-assistant.io/integrations/binary_sensor/#device-class and unlike versions before the new "Shiny new state colors" feature).

This same color is displayed in history graphs, so at the moment I have graphs with bars of the same color although the "On" and "Off" string is shown on the bar itself, which makes the rather hard to understand and use.

Screenshot 2022-12-11 at 18 36 03

Describe the behavior you expected

I expected the binary sensor to have different icons and different color for on and off, but only the icon changes since 2022.12.

Steps to reproduce the issue

type: vertical-stack
cards:
  - type: entities
    entities:
      - entity: binary_sensor.any_motion_sensor

What version of Home Assistant Core has the issue?

2022.12.1

What was the last working version of Home Assistant Core?

2022.11.5

In which browser are you experiencing the issue with?

No response

Which operating system are you using to run this browser?

No response

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

I also tried with latest git version of home-assistant/frontend.

@ildar170975
Copy link
Contributor

ildar170975 commented Dec 11, 2022

Are you using a default theme?
With a default theme I see this (2022.12.1):
image

@smonesi
Copy link
Contributor Author

smonesi commented Dec 11, 2022

Yes, I use the default theme. However, hoping to find a solution in more recent commits, I am using the latest development version of frontend (which I believe changed the default color to yellow).

Is it true that your motion sensor keeps detecting motion for so many minutes? 😄

I am specifically talking about binary_sensor with device_class: motion (for example, but I tried different classes with the same result), not about input_boolean (that does look like yours also on my system, in fact), as shown here (the first is the binary_sensor that shows if there is movement, the second is an input_boolean that I use to turn on/off automations related to that sensor):

Screenshot 2022-12-11 at 18 55 44

@ildar170975
Copy link
Contributor

ildar170975 commented Dec 11, 2022

motion sensor keeps detecting motion for so many minutes?

binary_sensor with device_class: motion

For testing colors of binary sensors I am using this solution:
https://community.home-assistant.io/t/i-dislike-the-2022-12-color-changes/499890/163?u=ildar_gabdullin
There are testing binary_sensor entities with different device_class and a testing card:
image

This card is for testing colors for icons & history-graph.

@ildar170975
Copy link
Contributor

I am using the latest development version of frontend (which I believe changed the default color to yellow).

Do not see this updated, I am using the latest version too (HA in Container):
image

@ildar170975
Copy link
Contributor

ildar170975 commented Dec 13, 2022

OMG, got same with 2022.12.4:

binary_sensor, device_class: cold

unknown, on, off

image

Similarly for a "gas" class:
image

@KennethLavrsen
Copy link

I also see yellow on yellow now on a history for motion sensor. How is this possible? It has to be a bug

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants