diff --git a/src/data/history.ts b/src/data/history.ts index e0fc8bd328..53b83896e8 100644 --- a/src/data/history.ts +++ b/src/data/history.ts @@ -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)) || diff --git a/src/panels/history/ha-panel-history.ts b/src/panels/history/ha-panel-history.ts index 9efaf89672..d353015407 100644 --- a/src/panels/history/ha-panel-history.ts +++ b/src/panels/history/ha-panel-history.ts @@ -421,6 +421,7 @@ class HaPanelHistory extends LitElement { [], this.hass.localize, sensorNumericDeviceClasses, + true, true ); // remap states array to statistics array