From effb4b9f7aeb640cbb354645556e4a98a90492cb Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Mon, 13 Mar 2023 11:52:27 +0100 Subject: [PATCH] Force using history for all entity domains on map card (#15804) --- src/data/history.ts | 11 +++++++---- src/panels/lovelace/cards/hui-map-card.ts | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/data/history.ts b/src/data/history.ts index b0d1d4b041..0bd3bd2e3f 100644 --- a/src/data/history.ts +++ b/src/data/history.ts @@ -232,7 +232,8 @@ export const subscribeHistoryStatesTimeWindow = ( hoursToShow: number, entityIds: string[], minimalResponse = true, - significantChangesOnly = true + significantChangesOnly = true, + noAttributes?: boolean ): Promise<() => Promise> => { const params = { type: "history/stream", @@ -242,9 +243,11 @@ export const subscribeHistoryStatesTimeWindow = ( ).toISOString(), minimal_response: minimalResponse, significant_changes_only: significantChangesOnly, - no_attributes: !entityIds.some((entityId) => - entityIdHistoryNeedsAttributes(hass, entityId) - ), + no_attributes: + noAttributes ?? + !entityIds.some((entityId) => + entityIdHistoryNeedsAttributes(hass, entityId) + ), }; const stream = new HistoryStream(hass, hoursToShow); return hass.connection.subscribeMessage( diff --git a/src/panels/lovelace/cards/hui-map-card.ts b/src/panels/lovelace/cards/hui-map-card.ts index 83f4f3dc38..0e965a47d0 100644 --- a/src/panels/lovelace/cards/hui-map-card.ts +++ b/src/panels/lovelace/cards/hui-map-card.ts @@ -216,6 +216,7 @@ class HuiMapCard extends LitElement implements LovelaceCard { this._config!.hours_to_show! ?? DEFAULT_HOURS_TO_SHOW, this._configEntities!, false, + false, false ).catch((err) => { this._subscribed = undefined;