Add support for expanding the card without fullscreen.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user