frontend
frontend copied to clipboard
Color control doesn't work on some new badges
Checklist
- [X] I have updated to the latest available Home Assistant version.
- [X] I have cleared the cache of my browser.
- [X] I have tried a different browser to see if it is related to my browser.
- [X] I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.
Describe the issue you are experiencing
New badges don’t work correctly for color control in some cases. I have garage door open/close sensor. I created two badges one for open and one for closed. I set the open icon to garage open, and garage closed to closed icon. Similarly, it set the color to yellow for open and green for closed. Then I set the visiblity for each badge based on open or closed . When the garage is open the open badge appears and color is yellow and the icon is open. When the garage is closed then icon is closed but the color is grey, not green. I have other sensors (3 states) for air quality sensor that work correctly for color control.
Describe the behavior you expected
I expect the icon to turn green when the garage door is closed, not grey
Steps to reproduce the issue
- Create two badges for garage door sensors, one for open and one for close
Doesn't work
type: entity
entity: binary_sensor.garage_door_sensor_opening
icon: mdi:garage
display_type: complete
name: Garage
color: green ## <--- displayed icon color is grey (Dark Theme)
visibility:
- condition: state
entity: binary_sensor.garage_door_sensor_opening
state: 'off'
Works
type: entity
entity: binary_sensor.garage_door_sensor_opening
icon: mdi:garage-open
display_type: complete
name: Garage
color: yellow
visibility:
- condition: state
entity: binary_sensor.garage_door_sensor_opening
state: 'on'
Also works
type: entity
entity: sensor.air_quality_result
display_type: complete
visibility:
- condition: state
entity: sensor.air_quality_result
state: Good
color: green
- When the state of the garage door sensor is open it works. When the garage door is closed the icon does not turn green.
What version of Home Assistant Core has the issue?
2028.8.1
What was the last working version of Home Assistant Core?
No response
In which browser are you experiencing the issue with?
Google Chrome 127.0.6533.100
Which operating system are you using to run this browser?
Windows 11 Pro 22631.3880
State of relevant entities
No response
Problem-relevant frontend configuration
No response
Javascript errors shown in your browser console/inspector
No response
Additional information
No response