diff --git a/src/data/history.ts b/src/data/history.ts index fb784b54f4..553421d404 100644 --- a/src/data/history.ts +++ b/src/data/history.ts @@ -640,6 +640,12 @@ export const mergeHistoryResults = ( } for (const item of ltsResult.line) { + if (item.unit === BLANK_UNIT) { + // disabled entities have no unit, so we need to find the unit from the history result + item.unit = + historyResult.line.find((line) => line.identifier === item.identifier) + ?.unit ?? BLANK_UNIT; + } const key = computeGroupKey( item.unit, item.device_class,