UNPKG

extra-map-card

Version:

Lovelace custom map card for Home Assistant

268 lines (267 loc) 10.3 kB
import { LocalizeFunc } from '@types'; export declare const CARD_VERSION: string; export declare const DEFAULT_HOURS_TO_SHOW = 0; export declare const DEFAULT_ZOOM = 14; export declare const singleMapConfingSchema: import("memoize-one").MemoizedFn<(localize: LocalizeFunc) => readonly [{ readonly type: "expandable"; readonly iconPath: string; readonly title: string; readonly schema: readonly [{ readonly name: ""; readonly type: "grid"; readonly schema: readonly ({ name: "auto_fit" | "fit_zones" | "use_more_info"; label: string; default: boolean; selector: { boolean: {}; }; } | { name: string; label: string; selector: { text: {}; number?: undefined; }; default?: undefined; } | { name: string; label: string; default: number; selector: { number: { mode: string; min: number; }; text?: undefined; }; })[]; }, { readonly title: "Custom Hours to Show"; readonly type: "expandable"; readonly icon: "mdi:history"; readonly flatten: true; readonly schema: readonly [{ readonly name: "hours_to_show"; readonly label: "Hours to Show"; readonly default: 0; readonly required: false; readonly selector: { readonly number: { readonly mode: "box"; readonly min: 0; }; }; }, { readonly name: "history_period"; readonly label: "History Period"; readonly required: false; readonly helper: "Time period to show, from now backwards (e.g., today = since midnight, yesterday = last 24 hours)"; readonly selector: { readonly select: { readonly mode: "dropdown"; readonly options: { value: "today" | "yesterday"; label: string; }[]; }; }; }, { readonly name: "hours_to_show_template"; readonly label: "Hours to Show Template"; readonly required: false; readonly helper: "Jinja2 template that defines the number of hours to show"; readonly selector: { readonly template: {}; }; }]; }, ...{ title: string; type: string; icon: string; schema: ({ name: string; label: string; default: string; selector: { select: { mode: string; options: { value: "auto" | "light" | "dark"; label: string; }[]; }; }; type?: undefined; schema?: undefined; } | { type: string; name: string; schema: { name: "light" | "dark"; label: string; selector: { select: { mode: string; options: { value: "BACKDROP" | "BACKDROP.DARK" | "BACKDROP.LIGHT" | "BASIC" | "BASIC.DARK" | "BASIC.LIGHT" | "BRIGHT" | "BRIGHT.DARK" | "BRIGHT.LIGHT" | "BRIGHT.PASTEL" | "DATAVIZ" | "DATAVIZ.DARK" | "DATAVIZ.LIGHT" | "HYBRID" | "OPENSTREETMAP" | "OUTDOOR" | "SATELLITE" | "STREETS" | "STREETS.DARK" | "STREETS.LIGHT" | "STREETS.PASTEL" | "TONER" | "TONER.BACKGROUND" | "TONER.LINES" | "TONER.LITE" | "TOPO" | "TOPO.PASTEL" | "TOPO.SHINY" | "TOPO.TOPOGRAPHIQUE" | "VOYAGER" | "VOYAGER.DARK" | "VOYAGER.LIGHT" | "VOYAGER.VINTAGE" | "WINTER"; label: "BACKDROP" | "BACKDROP.DARK" | "BACKDROP.LIGHT" | "BASIC" | "BASIC.DARK" | "BASIC.LIGHT" | "BRIGHT" | "BRIGHT.DARK" | "BRIGHT.LIGHT" | "BRIGHT.PASTEL" | "DATAVIZ" | "DATAVIZ.DARK" | "DATAVIZ.LIGHT" | "HYBRID" | "OPENSTREETMAP" | "OUTDOOR" | "SATELLITE" | "STREETS" | "STREETS.DARK" | "STREETS.LIGHT" | "STREETS.PASTEL" | "TONER" | "TONER.BACKGROUND" | "TONER.LINES" | "TONER.LITE" | "TOPO" | "TOPO.PASTEL" | "TOPO.SHINY" | "TOPO.TOPOGRAPHIQUE" | "VOYAGER" | "VOYAGER.DARK" | "VOYAGER.LIGHT" | "VOYAGER.VINTAGE" | "WINTER"; }[]; }; }; }[]; label?: undefined; default?: undefined; selector?: undefined; })[]; }[]]; }]>; export declare const baseMapConfigSchema: import("memoize-one").MemoizedFn<() => readonly [{ readonly name: "title"; readonly label: "Title"; readonly selector: { readonly text: { readonly type: "text"; }; }; }, { readonly name: "api_key"; readonly label: "MapTiler API Key (required)"; readonly required: true; readonly selector: { readonly text: { readonly type: "text"; }; }; }]>; export declare const mapConfigSchema: import("memoize-one").MemoizedFn<(localize: LocalizeFunc, noTitle?: boolean) => ({ readonly type: "expandable"; readonly iconPath: string; readonly title: string; readonly schema: readonly [{ readonly name: ""; readonly type: "grid"; readonly schema: readonly ({ name: "auto_fit" | "fit_zones" | "use_more_info"; label: string; default: boolean; selector: { boolean: {}; }; } | { name: string; label: string; selector: { text: {}; number?: undefined; }; default?: undefined; } | { name: string; label: string; default: number; selector: { number: { mode: string; min: number; }; text?: undefined; }; })[]; }, { readonly title: "Custom Hours to Show"; readonly type: "expandable"; readonly icon: "mdi:history"; readonly flatten: true; readonly schema: readonly [{ readonly name: "hours_to_show"; readonly label: "Hours to Show"; readonly default: 0; readonly required: false; readonly selector: { readonly number: { readonly mode: "box"; readonly min: 0; }; }; }, { readonly name: "history_period"; readonly label: "History Period"; readonly required: false; readonly helper: "Time period to show, from now backwards (e.g., today = since midnight, yesterday = last 24 hours)"; readonly selector: { readonly select: { readonly mode: "dropdown"; readonly options: { value: "today" | "yesterday"; label: string; }[]; }; }; }, { readonly name: "hours_to_show_template"; readonly label: "Hours to Show Template"; readonly required: false; readonly helper: "Jinja2 template that defines the number of hours to show"; readonly selector: { readonly template: {}; }; }]; }, ...{ title: string; type: string; icon: string; schema: ({ name: string; label: string; default: string; selector: { select: { mode: string; options: { value: "auto" | "light" | "dark"; label: string; }[]; }; }; type?: undefined; schema?: undefined; } | { type: string; name: string; schema: { name: "light" | "dark"; label: string; selector: { select: { mode: string; options: { value: "BACKDROP" | "BACKDROP.DARK" | "BACKDROP.LIGHT" | "BASIC" | "BASIC.DARK" | "BASIC.LIGHT" | "BRIGHT" | "BRIGHT.DARK" | "BRIGHT.LIGHT" | "BRIGHT.PASTEL" | "DATAVIZ" | "DATAVIZ.DARK" | "DATAVIZ.LIGHT" | "HYBRID" | "OPENSTREETMAP" | "OUTDOOR" | "SATELLITE" | "STREETS" | "STREETS.DARK" | "STREETS.LIGHT" | "STREETS.PASTEL" | "TONER" | "TONER.BACKGROUND" | "TONER.LINES" | "TONER.LITE" | "TOPO" | "TOPO.PASTEL" | "TOPO.SHINY" | "TOPO.TOPOGRAPHIQUE" | "VOYAGER" | "VOYAGER.DARK" | "VOYAGER.LIGHT" | "VOYAGER.VINTAGE" | "WINTER"; label: "BACKDROP" | "BACKDROP.DARK" | "BACKDROP.LIGHT" | "BASIC" | "BASIC.DARK" | "BASIC.LIGHT" | "BRIGHT" | "BRIGHT.DARK" | "BRIGHT.LIGHT" | "BRIGHT.PASTEL" | "DATAVIZ" | "DATAVIZ.DARK" | "DATAVIZ.LIGHT" | "HYBRID" | "OPENSTREETMAP" | "OUTDOOR" | "SATELLITE" | "STREETS" | "STREETS.DARK" | "STREETS.LIGHT" | "STREETS.PASTEL" | "TONER" | "TONER.BACKGROUND" | "TONER.LINES" | "TONER.LITE" | "TOPO" | "TOPO.PASTEL" | "TOPO.SHINY" | "TOPO.TOPOGRAPHIQUE" | "VOYAGER" | "VOYAGER.DARK" | "VOYAGER.LIGHT" | "VOYAGER.VINTAGE" | "WINTER"; }[]; }; }; }[]; label?: undefined; default?: undefined; selector?: undefined; })[]; }[]]; } | { readonly name: "title"; readonly label: "Title"; readonly selector: { readonly text: { readonly type: "text"; }; }; } | { readonly name: "api_key"; readonly label: "MapTiler API Key (required)"; readonly required: true; readonly selector: { readonly text: { readonly type: "text"; }; }; })[]>;