Add camera view support to image element (#16346)

This commit is contained in:
Paul Bottein 2023-04-28 14:17:33 +02:00 committed by GitHub
parent c7f1f1bcd1
commit 3b33195ff6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -42,6 +42,7 @@ export class HuiImageElement extends LitElement implements LovelaceElement {
.image=${this._config.image} .image=${this._config.image}
.stateImage=${this._config.state_image} .stateImage=${this._config.state_image}
.cameraImage=${this._config.camera_image} .cameraImage=${this._config.camera_image}
.cameraView=${this._config.camera_view}
.filter=${this._config.filter} .filter=${this._config.filter}
.stateFilter=${this._config.state_filter} .stateFilter=${this._config.state_filter}
.title=${computeTooltip(this.hass, this._config)} .title=${computeTooltip(this.hass, this._config)}

View File

@ -1,6 +1,7 @@
import { ActionConfig } from "../../../data/lovelace"; import { ActionConfig } from "../../../data/lovelace";
import { HomeAssistant } from "../../../types"; import { HomeAssistant } from "../../../types";
import { Condition } from "../common/validate-condition"; import { Condition } from "../common/validate-condition";
import { HuiImage } from "../components/hui-image";
interface LovelaceElementConfigBase { interface LovelaceElementConfigBase {
type: string; type: string;
@ -43,6 +44,7 @@ export interface ImageElementConfig extends LovelaceElementConfigBase {
image?: string; image?: string;
state_image?: string; state_image?: string;
camera_image?: string; camera_image?: string;
camera_view?: HuiImage["cameraView"];
dark_mode_image?: string; dark_mode_image?: string;
dark_mode_filter?: string; dark_mode_filter?: string;
filter?: string; filter?: string;