Closed ochstobi closed 4 years ago
Please check Developer Tools > States? Is brightness still an attribute when off?
If so that would be an integration issue believe as that should be reported when off, to my knowledge. What light integration are you using?
I have a MQTT integration for a zigbee device. In fact the brightness is still an attribute when turned off. I think it is to retain the brightness so it is in the same dimmed state when turned on again.
==Turned on at full brightness== brightness: 255 linkquality: 0 state: 'ON' friendly_name: Licht Wohnzimmer (dimmbar) supported_features: 41
==Turned off while full brightness brightness: 255 linkquality: 0 state: 'OFF' friendly_name: Licht Wohnzimmer (dimmbar) supported_features: 41
==Turned on while dimmed brightness: 43 linkquality: 0 state: 'ON' friendly_name: Licht Wohnzimmer (dimmbar) supported_features: 41
==Turned off while dimmed== brightness: 43 linkquality: 0 state: 'OFF' friendly_name: Licht Wohnzimmer (dimmbar) supported_features: 41
Well there's our answer then. Wonder if there are any others doing this
So right here https://github.com/home-assistant/frontend/blob/dev/src/components/entity/state-badge.ts#L87 we should add a check that stateObj.state === 'on'
I could not imagine that everyone else is setting the brightness to 255 before simply turning the light off. Simple case is you dimm the light in home assistant and later on you tap the physical switch which turns your light off.
Shouldn't there be a fix color when turned off instead of going darker from brightness - x?
@ochstobi most integrations do not provide brightness when they are 'off', but the fix is just what I posted earlier and fairly simple
Checklist
The problem
When an light is dimmed, the bulb icon is getting darker. When turned off while dimmed the icon is darker than normal.
Expected behavior
The icon should have the right color (like the others).
Steps to reproduce
Add a dimmable light. Dimm it down to 5-10% and then turn it off.
Environment
Home Assistant v0.107.5. The issue is on mobile phones (ios/android) and with every browser.
Problem-relevant configuration
Should not be configuration relevant.
Javascript errors shown in your browser console/inspector
None.
Additional information