Add missing cardConfig attribute,
This commit is contained in:
+4
-16
@@ -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'}
|
||||
>
|
||||
<paper-listbox slot="dropdown-content" .selected=${entities.indexOf(this._entity)}>
|
||||
<paper-listbox slot="dropdown-content" .selected=${entities.indexOf(this._camera_entity)}>
|
||||
${entities.map(entity => {
|
||||
return html`
|
||||
<paper-item>${entity}</paper-item>
|
||||
|
||||
+2
-1
@@ -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 {
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user