From 78857357f3ca0b8d2aaa6b632eef851d544097e9 Mon Sep 17 00:00:00 2001 From: holnburger Date: Tue, 24 Jan 2023 15:31:25 +0100 Subject: [PATCH] Add dark_mode options for image elements in picture-element-card (#15045) --- src/panels/lovelace/elements/hui-image-element.ts | 2 ++ src/panels/lovelace/elements/types.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/panels/lovelace/elements/hui-image-element.ts b/src/panels/lovelace/elements/hui-image-element.ts index 386480bbe8..8a494df9a6 100644 --- a/src/panels/lovelace/elements/hui-image-element.ts +++ b/src/panels/lovelace/elements/hui-image-element.ts @@ -46,6 +46,8 @@ export class HuiImageElement extends LitElement implements LovelaceElement { .stateFilter=${this._config.state_filter} .title=${computeTooltip(this.hass, this._config)} .aspectRatio=${this._config.aspect_ratio} + .darkModeImage=${this._config.dark_mode_image} + .darkModeFilter=${this._config.dark_mode_filter} @action=${this._handleAction} .actionHandler=${actionHandler({ hasHold: hasAction(this._config!.hold_action), diff --git a/src/panels/lovelace/elements/types.ts b/src/panels/lovelace/elements/types.ts index 1894946a13..5b0d3f1014 100644 --- a/src/panels/lovelace/elements/types.ts +++ b/src/panels/lovelace/elements/types.ts @@ -43,6 +43,8 @@ export interface ImageElementConfig extends LovelaceElementConfigBase { image?: string; state_image?: string; camera_image?: string; + dark_mode_image?: string; + dark_mode_filter?: string; filter?: string; state_filter?: string; aspect_ratio?: string;