Add support for expanding the card without fullscreen.

This commit is contained in:
Dermot Duffy
2023-03-11 15:38:54 -08:00
parent ab35c3234d
commit 24613e7ed9
12 changed files with 157 additions and 21 deletions
+5
View File
@@ -12,6 +12,7 @@ import { copyConfig } from './config-mgmt';
export interface ConditionState {
view?: string;
fullscreen?: boolean;
expand?: boolean;
camera?: string;
state?: HassEntities;
media_loaded?: boolean;
@@ -37,6 +38,10 @@ function evaluateCondition(
result &&=
state.fullscreen !== undefined && condition.fullscreen == state.fullscreen;
}
if (condition?.expand !== undefined) {
result &&=
state.expand !== undefined && condition.expand == state.expand;
}
if (condition?.camera?.length) {
result &&= !!state.camera && condition.camera.includes(state.camera);
}