Initial skeletal Frigate lovelace card.
This commit is contained in:
+8
-9
@@ -1,5 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/* eslint-disable @typescript-eslint/camelcase */
|
||||
import {
|
||||
LitElement,
|
||||
html,
|
||||
@@ -8,11 +7,11 @@ import {
|
||||
TemplateResult,
|
||||
CSSResult,
|
||||
css,
|
||||
internalProperty,
|
||||
state,
|
||||
} from 'lit-element';
|
||||
import { HomeAssistant, fireEvent, LovelaceCardEditor, ActionConfig } from 'custom-card-helpers';
|
||||
|
||||
import { BoilerplateCardConfig } from './types';
|
||||
import { FrigateCardConfig } from './types';
|
||||
|
||||
const options = {
|
||||
required: {
|
||||
@@ -55,15 +54,15 @@ const options = {
|
||||
},
|
||||
};
|
||||
|
||||
@customElement('boilerplate-card-editor')
|
||||
export class BoilerplateCardEditor extends LitElement implements LovelaceCardEditor {
|
||||
@customElement('frigate-card-editor')
|
||||
export class FrigateCardEditor extends LitElement implements LovelaceCardEditor {
|
||||
@property({ attribute: false }) public hass?: HomeAssistant;
|
||||
@internalProperty() private _config?: BoilerplateCardConfig;
|
||||
@internalProperty() private _toggle?: boolean;
|
||||
@internalProperty() private _helpers?: any;
|
||||
@state() private _config?: FrigateCardConfig;
|
||||
@state() private _toggle?: boolean;
|
||||
@state() private _helpers?: any;
|
||||
private _initialized = false;
|
||||
|
||||
public setConfig(config: BoilerplateCardConfig): void {
|
||||
public setConfig(config: FrigateCardConfig): void {
|
||||
this._config = config;
|
||||
|
||||
this.loadCardHelpers();
|
||||
|
||||
Reference in New Issue
Block a user