mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-31 21:17:47 +00:00
Change function name
This commit is contained in:
parent
c377c01c65
commit
a63e788ced
@ -201,7 +201,7 @@ const processLineChartEntities = (
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const isNumberValued = (states: HassEntity[]): boolean => {
|
const isNumerical = (states: HassEntity[]): boolean => {
|
||||||
if (states.every((state) => UNAVAILABLE_STATES.includes(state.state))) {
|
if (states.every((state) => UNAVAILABLE_STATES.includes(state.state))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ export const computeHistory = (
|
|||||||
unit = hass.config.unit_system.temperature;
|
unit = hass.config.unit_system.temperature;
|
||||||
} else if (computeStateDomain(stateInfo[0]) === "humidifier") {
|
} else if (computeStateDomain(stateInfo[0]) === "humidifier") {
|
||||||
unit = "%";
|
unit = "%";
|
||||||
} else if (isNumberValued(stateInfo)) {
|
} else if (isNumerical(stateInfo)) {
|
||||||
unit = " ";
|
unit = " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user