UNPKG

extra-map-card

Version:

Lovelace custom map card for Home Assistant

22 lines (21 loc) 1.19 kB
import { HomeAssistant } from '../home-assistant'; export type HistoryStates = Record<string, EntityHistoryState[]>; export interface EntityHistoryState { /** state */ s: string; /** attributes */ a: Record<string, any>; /** last_changed; if set, also applies to lu */ lc?: number; /** last_updated */ lu: number; } export interface HistoryStreamMessage { states: HistoryStates; start_time?: number; end_time?: number; } export declare const entityIdHistoryNeedsAttributes: (hass: HomeAssistant, entityId: string) => boolean; export declare const fetchDateWS: (hass: HomeAssistant, startTime: Date, endTime: Date, entityIds: string[]) => Promise<HistoryStates>; export declare const subscribeHistoryStatesTimeWindow: (hass: HomeAssistant, callbackFunction: (data: HistoryStates) => void, hoursToShow: number, entityIds: string[], noAttributes?: boolean, minimalResponse?: boolean, significantChangesOnly?: boolean) => Promise<() => Promise<void>>; export declare const subscribeHistory: (hass: HomeAssistant, callbackFunction: (data: HistoryStates) => void, startTime: Date, endTime: Date, entityIds: string[]) => Promise<() => Promise<void>>;