fix: Use HA style and coloring for all icons (#1790)
This commit is contained in:
+15
-11
@@ -5,7 +5,6 @@ import {
|
||||
LovelaceCardEditor,
|
||||
Themes,
|
||||
} from '@dermotduffy/custom-card-helpers';
|
||||
import { StyleInfo } from 'lit/directives/style-map.js';
|
||||
import { z } from 'zod';
|
||||
|
||||
export type ClipsOrSnapshots = 'clips' | 'snapshots';
|
||||
@@ -65,16 +64,6 @@ export interface Message {
|
||||
dotdotdot?: boolean;
|
||||
}
|
||||
|
||||
export interface StateParameters {
|
||||
entity?: string;
|
||||
icon?: string;
|
||||
title?: string | null;
|
||||
state_color?: boolean;
|
||||
style?: StyleInfo;
|
||||
data_domain?: string;
|
||||
data_state?: string;
|
||||
}
|
||||
|
||||
export interface FrigateCardMediaPlayer {
|
||||
play(): Promise<void>;
|
||||
pause(): Promise<void>;
|
||||
@@ -143,6 +132,21 @@ export const capabilityKeys: readonly [CapabilityKey, ...CapabilityKey[]] = [
|
||||
'substream',
|
||||
] as const;
|
||||
|
||||
export interface Icon {
|
||||
// If set, this icon will be used.
|
||||
icon?: string;
|
||||
|
||||
// If icon is not set, this entity's icon will be used (and HA will be asked
|
||||
// to render it).
|
||||
entity?: string;
|
||||
|
||||
// Whether or not to change the icon color depending on entity state.
|
||||
stateColor?: boolean;
|
||||
|
||||
// If an icon is not otherwise resolved / available, this will be used instead.
|
||||
fallback?: string;
|
||||
}
|
||||
|
||||
// *************************************************************************
|
||||
// Home Assistant API types.
|
||||
// *************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user