Initial skeletal Frigate lovelace card.

This commit is contained in:
Dermot Duffy
2021-08-08 15:33:31 -07:00
parent ed1b89f2d3
commit ed013293f7
19 changed files with 643 additions and 362 deletions
+30 -5
View File
@@ -1,21 +1,46 @@
import { ActionConfig, LovelaceCard, LovelaceCardConfig, LovelaceCardEditor } from 'custom-card-helpers';
declare global {
interface HTMLElementTagNameMap {
'boilerplate-card-editor': LovelaceCardEditor;
'frigate-card-editor': LovelaceCardEditor;
'hui-error-card': LovelaceCard;
}
}
// TODO Add your configuration elements here for type-checking
export interface BoilerplateCardConfig extends LovelaceCardConfig {
export interface FrigateCardConfig extends LovelaceCardConfig {
type: string;
name?: string;
camera_entity: string;
motion_entity: string | null;
frigate_url: string;
frigate_camera_name?: string | null;
default_view: string | null;
timeout_ms?: number | null;
show_warning?: boolean;
show_error?: boolean;
test_gui?: boolean;
entity?: string;
tap_action?: ActionConfig;
hold_action?: ActionConfig;
double_tap_action?: ActionConfig;
}
export interface FrigateEvent {
camera: string;
end_time: number;
false_positive: boolean;
has_clip: boolean;
has_snapshot: boolean;
id: string;
label: string;
start_time: number;
thumbnail: string;
top_score: number;
zones: string[];
}
export interface GetEventsParameters {
has_clip?: boolean;
has_snapshot?: boolean;
limit?: number;
}