When munging statistics to history, assume always numeric (#20544)
This commit is contained in:
parent
4b593c1c96
commit
b5277dee53
|
@ -422,7 +422,8 @@ export const computeHistory = (
|
|||
entityIds: string[],
|
||||
localize: LocalizeFunc,
|
||||
sensorNumericalDeviceClasses: string[],
|
||||
splitDeviceClasses = false
|
||||
splitDeviceClasses = false,
|
||||
forceNumeric = false
|
||||
): HistoryResult => {
|
||||
const lineChartDevices: { [unit: string]: HistoryStates } = {};
|
||||
const timelineDevices: TimelineEntity[] = [];
|
||||
|
@ -468,6 +469,7 @@ export const computeHistory = (
|
|||
let unit: string | undefined;
|
||||
|
||||
const isNumeric =
|
||||
forceNumeric ||
|
||||
isNumericFromDomain(domain) ||
|
||||
(currentState != null &&
|
||||
isNumericFromAttributes(currentState.attributes)) ||
|
||||
|
|
|
@ -421,6 +421,7 @@ class HaPanelHistory extends LitElement {
|
|||
[],
|
||||
this.hass.localize,
|
||||
sensorNumericDeviceClasses,
|
||||
true,
|
||||
true
|
||||
);
|
||||
// remap states array to statistics array
|
||||
|
|
Loading…
Reference in New Issue