UNPKG

extra-map-card

Version:

Lovelace custom map card for Home Assistant

49 lines (48 loc) 1.78 kB
import { HomeAssistant, LovelaceCard, LovelaceCardEditor, LovelaceGridOptions } from '@types'; import { LitElement, TemplateResult, nothing, PropertyValues } from 'lit'; import { ExtraMapCardConfig } from 'types/config'; import { EmcMap } from './components/emc-map'; import './components/emc-map'; import './components/emc-sub-entity-editor'; import './components/emc-entity-editor'; export declare class ExtraMapCard extends LitElement implements LovelaceCard { static getConfigElement(): Promise<LovelaceCardEditor>; hass: HomeAssistant; layout?: string; private _config?; private _configEntities?; private _mapEntities; private _colorDict; private _colorIndex; private _zoom; private _subscribed?; private _stateHistory?; private _error?; _mapTiler?: EmcMap; private _getAllEntities; static getStubConfig(hass: HomeAssistant, entities: string[], entitiesFallback: string[]): ExtraMapCardConfig; setConfig(config: ExtraMapCardConfig): void; getCardSize(): number; getGridOptions(): LovelaceGridOptions; protected render(): TemplateResult | typeof nothing; protected shouldUpdate(changedProps: PropertyValues): boolean; protected willUpdate(changedProps: PropertyValues): void; connectedCallback(): void; disconnectedCallback(): void; private _subscribeHistory; private _unsubscribeHistory; protected updated(changedProps: PropertyValues): void; private _computePadding; private _getColor; private _getMapEntities; private _getHistoryPaths; static styles: import("lit").CSSResult; } declare global { interface HTMLElementTagNameMap { 'extra-map-card': ExtraMapCard; } interface Window { ExtraMapCard: ExtraMapCard; } }