mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 13:57:21 +00:00
Prevent wrong colors in history timeline for inverted unavailable states (#10137)
This commit is contained in:
parent
8e3011807d
commit
375a5323d5
@ -56,7 +56,11 @@ const getColor = (
|
||||
entityState: HassEntity,
|
||||
computedStyles: CSSStyleDeclaration
|
||||
) => {
|
||||
if (invertOnOff(entityState)) {
|
||||
// Inversion is only valid for "on" or "off" state
|
||||
if (
|
||||
(stateString === "on" || stateString === "off") &&
|
||||
invertOnOff(entityState)
|
||||
) {
|
||||
stateString = stateString === "on" ? "off" : "on";
|
||||
}
|
||||
if (stateColorMap.has(stateString)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user