mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 18:56:39 +00:00
Fix a coloring issue with climate states (#15325)
This commit is contained in:
parent
52d869f5b8
commit
adb65176f0
@ -133,7 +133,7 @@ export class StateBadge extends LitElement {
|
|||||||
}
|
}
|
||||||
if (stateObj.attributes.hvac_action) {
|
if (stateObj.attributes.hvac_action) {
|
||||||
const hvacAction = stateObj.attributes.hvac_action;
|
const hvacAction = stateObj.attributes.hvac_action;
|
||||||
if (["heating", "cooling", "drying", "fan"].includes(hvacAction)) {
|
if (hvacAction in HVAC_ACTION_TO_MODE) {
|
||||||
iconStyle.color = stateColorCss(
|
iconStyle.color = stateColorCss(
|
||||||
stateObj,
|
stateObj,
|
||||||
HVAC_ACTION_TO_MODE[hvacAction]
|
HVAC_ACTION_TO_MODE[hvacAction]
|
||||||
|
@ -323,7 +323,7 @@ export class HuiButtonCard extends LitElement implements LovelaceCard {
|
|||||||
}
|
}
|
||||||
if (stateObj.attributes.hvac_action) {
|
if (stateObj.attributes.hvac_action) {
|
||||||
const hvacAction = stateObj.attributes.hvac_action;
|
const hvacAction = stateObj.attributes.hvac_action;
|
||||||
if (["heating", "cooling", "drying", "fan"].includes(hvacAction)) {
|
if (hvacAction in HVAC_ACTION_TO_MODE) {
|
||||||
return stateColorCss(stateObj, HVAC_ACTION_TO_MODE[hvacAction]);
|
return stateColorCss(stateObj, HVAC_ACTION_TO_MODE[hvacAction]);
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
|
@ -195,7 +195,7 @@ export class HuiEntityCard extends LitElement implements LovelaceCard {
|
|||||||
private _computeColor(stateObj: HassEntity): string | undefined {
|
private _computeColor(stateObj: HassEntity): string | undefined {
|
||||||
if (stateObj.attributes.hvac_action) {
|
if (stateObj.attributes.hvac_action) {
|
||||||
const hvacAction = stateObj.attributes.hvac_action;
|
const hvacAction = stateObj.attributes.hvac_action;
|
||||||
if (["heating", "cooling", "drying", "fan"].includes(hvacAction)) {
|
if (hvacAction in HVAC_ACTION_TO_MODE) {
|
||||||
return stateColorCss(stateObj, HVAC_ACTION_TO_MODE[hvacAction]);
|
return stateColorCss(stateObj, HVAC_ACTION_TO_MODE[hvacAction]);
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user