mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Force using history for all entity domains on map card (#15804)
This commit is contained in:
parent
1bc7bb0169
commit
effb4b9f7a
@ -232,7 +232,8 @@ export const subscribeHistoryStatesTimeWindow = (
|
|||||||
hoursToShow: number,
|
hoursToShow: number,
|
||||||
entityIds: string[],
|
entityIds: string[],
|
||||||
minimalResponse = true,
|
minimalResponse = true,
|
||||||
significantChangesOnly = true
|
significantChangesOnly = true,
|
||||||
|
noAttributes?: boolean
|
||||||
): Promise<() => Promise<void>> => {
|
): Promise<() => Promise<void>> => {
|
||||||
const params = {
|
const params = {
|
||||||
type: "history/stream",
|
type: "history/stream",
|
||||||
@ -242,9 +243,11 @@ export const subscribeHistoryStatesTimeWindow = (
|
|||||||
).toISOString(),
|
).toISOString(),
|
||||||
minimal_response: minimalResponse,
|
minimal_response: minimalResponse,
|
||||||
significant_changes_only: significantChangesOnly,
|
significant_changes_only: significantChangesOnly,
|
||||||
no_attributes: !entityIds.some((entityId) =>
|
no_attributes:
|
||||||
entityIdHistoryNeedsAttributes(hass, entityId)
|
noAttributes ??
|
||||||
),
|
!entityIds.some((entityId) =>
|
||||||
|
entityIdHistoryNeedsAttributes(hass, entityId)
|
||||||
|
),
|
||||||
};
|
};
|
||||||
const stream = new HistoryStream(hass, hoursToShow);
|
const stream = new HistoryStream(hass, hoursToShow);
|
||||||
return hass.connection.subscribeMessage<HistoryStreamMessage>(
|
return hass.connection.subscribeMessage<HistoryStreamMessage>(
|
||||||
|
@ -216,6 +216,7 @@ class HuiMapCard extends LitElement implements LovelaceCard {
|
|||||||
this._config!.hours_to_show! ?? DEFAULT_HOURS_TO_SHOW,
|
this._config!.hours_to_show! ?? DEFAULT_HOURS_TO_SHOW,
|
||||||
this._configEntities!,
|
this._configEntities!,
|
||||||
false,
|
false,
|
||||||
|
false,
|
||||||
false
|
false
|
||||||
).catch((err) => {
|
).catch((err) => {
|
||||||
this._subscribed = undefined;
|
this._subscribed = undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user