diff --git a/src/editor.ts b/src/editor.ts index 686db6d9..7ee86350 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -77,11 +77,11 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor } get _name(): string { - return this._config?.name || ''; + return "Frigate"; } - get _entity(): string { - return this._config?.entity || ''; + get _camera_entity(): string { + return this._config?.camera_entity || ''; } get _show_warning(): boolean { @@ -92,18 +92,6 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor return this._config?.show_error || false; } - get _tap_action(): ActionConfig { - return this._config?.tap_action || { action: 'more-info' }; - } - - get _hold_action(): ActionConfig { - return this._config?.hold_action || { action: 'none' }; - } - - get _double_tap_action(): ActionConfig { - return this._config?.double_tap_action || { action: 'none' }; - } - protected render(): TemplateResult | void { if (!this.hass || !this._helpers) { return html``; @@ -132,7 +120,7 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor @value-changed=${this._valueChanged} .configValue=${'entity'} > - + ${entities.map(entity => { return html` ${entity} diff --git a/src/frigate-card.ts b/src/frigate-card.ts index 37e7ca7e..c16a4327 100644 --- a/src/frigate-card.ts +++ b/src/frigate-card.ts @@ -1,6 +1,7 @@ // TODO Add material tooltips - // TODO Action handlers. +// TODO Make editor work. +// TODO Try nav popout menu. /* eslint-disable @typescript-eslint/no-explicit-any */ import { diff --git a/src/types.ts b/src/types.ts index 6bacc9f7..f59d3fbf 100644 --- a/src/types.ts +++ b/src/types.ts @@ -21,6 +21,8 @@ export const frigateCardConfigSchema = z.object({ view_timeout: z.number().optional(), label: z.string().optional(), + // Stock lovelace card config. + type: z.string(), show_warning: z.boolean().optional(), show_error: z.boolean().optional(), test_gui: z.boolean().optional(),