From 50bf1d1919c97694a32ffe0486e69695bfce3848 Mon Sep 17 00:00:00 2001 From: karwosts Date: Sat, 18 Nov 2023 09:25:13 -0800 Subject: [PATCH 1/9] Add a picture uploader to picture-card-editor --- .../hui-picture-card-editor.ts | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/panels/lovelace/editor/config-elements/hui-picture-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-picture-card-editor.ts index 1ce62d6a7822..ba2c9d9e5241 100644 --- a/src/panels/lovelace/editor/config-elements/hui-picture-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-picture-card-editor.ts @@ -4,12 +4,14 @@ import { assert, assign, object, optional, string } from "superstruct"; import { fireEvent } from "../../../../common/dom/fire_event"; import { SchemaUnion } from "../../../../components/ha-form/types"; import "../../../../components/ha-theme-picker"; -import { HomeAssistant } from "../../../../types"; +import { HomeAssistant, ValueChangedEvent } from "../../../../types"; import { PictureCardConfig } from "../../cards/types"; import "../../components/hui-action-editor"; import { LovelaceCardEditor } from "../../types"; import { actionConfigStruct } from "../structs/action-struct"; import { baseLovelaceCardConfig } from "../structs/base-card-struct"; +import "../../../../components/ha-picture-upload"; +import type { HaPictureUpload } from "../../../../components/ha-picture-upload"; const cardConfigStruct = assign( baseLovelaceCardConfig, @@ -58,6 +60,15 @@ export class HuiPictureCardEditor } return html` + + ) { + const picture = (ev.target as HaPictureUpload).value; + if (picture) { + fireEvent(this, "config-changed", { + config: { ...this._config!, image: picture }, + }); + } + } + private _computeLabelCallback = (schema: SchemaUnion) => { switch (schema.name) { case "theme": From 9afeadcbe7596579fb64dc2ec4746fdb6a3601cf Mon Sep 17 00:00:00 2001 From: karwosts Date: Wed, 22 Nov 2023 07:12:38 -0800 Subject: [PATCH 2/9] add imageSelector --- .../ha-selector/ha-selector-image.ts | 113 ++++++++++++++++++ src/components/ha-selector/ha-selector.ts | 1 + src/data/selector.ts | 6 + .../hui-picture-card-editor.ts | 24 +--- .../hui-picture-entity-card-editor.ts | 2 +- .../hui-picture-glance-card-editor.ts | 2 +- 6 files changed, 124 insertions(+), 24 deletions(-) create mode 100644 src/components/ha-selector/ha-selector-image.ts diff --git a/src/components/ha-selector/ha-selector-image.ts b/src/components/ha-selector/ha-selector-image.ts new file mode 100644 index 000000000000..e3effc860855 --- /dev/null +++ b/src/components/ha-selector/ha-selector-image.ts @@ -0,0 +1,113 @@ +import { mdiUpload, mdiUploadOff } from "@mdi/js"; +import { css, CSSResultGroup, html, nothing, LitElement } from "lit"; +import { customElement, property, state } from "lit/decorators"; +import { fireEvent } from "../../common/dom/fire_event"; +import { ImageSelector } from "../../data/selector"; +import { HomeAssistant } from "../../types"; +import "../ha-icon-button"; +import "../ha-textarea"; +import "../ha-textfield"; +import "../ha-picture-upload"; +import type { HaPictureUpload } from "../ha-picture-upload"; + +@customElement("ha-selector-image") +export class HaImageSelector extends LitElement { + @property() public hass!: HomeAssistant; + + @property() public value?: any; + + @property() public name?: string; + + @property() public label?: string; + + @property() public placeholder?: string; + + @property() public helper?: string; + + @property() public selector!: ImageSelector; + + @property({ type: Boolean }) public disabled = false; + + @property({ type: Boolean }) public required = true; + + @state() private showUpload = false; + + protected render() { + return html` +
+ + + +
+ ${this.showUpload + ? html` + + ` + : nothing} + `; + } + + private _handleUploadToggle() { + this.showUpload = !this.showUpload; + } + + private _pictureChanged(ev) { + const value = (ev.target as HaPictureUpload).value; + if (value) { + fireEvent(this, "value-changed", { value }); + } + } + + private _handleChange(ev) { + let value = ev.target.value; + if (this.value === value) { + return; + } + if (value === "" && !this.required) { + value = undefined; + } + + fireEvent(this, "value-changed", { value }); + } + + static get styles(): CSSResultGroup { + return css` + :host { + display: block; + position: relative; + } + div { + display: flex; + align-items: center; + } + ha-textarea, + ha-textfield { + width: 100%; + } + `; + } +} + +declare global { + interface HTMLElementTagNameMap { + "ha-selector-image": HaImageSelector; + } +} diff --git a/src/components/ha-selector/ha-selector.ts b/src/components/ha-selector/ha-selector.ts index e622721b6db5..8cab4393b8c9 100644 --- a/src/components/ha-selector/ha-selector.ts +++ b/src/components/ha-selector/ha-selector.ts @@ -32,6 +32,7 @@ const LOAD_ELEMENTS = { file: () => import("./ha-selector-file"), floor: () => import("./ha-selector-floor"), label: () => import("./ha-selector-label"), + image: () => import("./ha-selector-image"), language: () => import("./ha-selector-language"), navigation: () => import("./ha-selector-navigation"), number: () => import("./ha-selector-number"), diff --git a/src/data/selector.ts b/src/data/selector.ts index 172cf7263077..4396754ec669 100644 --- a/src/data/selector.ts +++ b/src/data/selector.ts @@ -40,6 +40,7 @@ export type Selector = | FileSelector | IconSelector | LabelSelector + | ImageSelector | LanguageSelector | LocationSelector | MediaSelector @@ -262,6 +263,11 @@ export interface LabelSelector { }; } +export interface ImageSelector { + // eslint-disable-next-line @typescript-eslint/ban-types + image: {} | null; +} + export interface LanguageSelector { language: { languages?: string[]; diff --git a/src/panels/lovelace/editor/config-elements/hui-picture-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-picture-card-editor.ts index ba2c9d9e5241..20ff12e88b41 100644 --- a/src/panels/lovelace/editor/config-elements/hui-picture-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-picture-card-editor.ts @@ -4,14 +4,12 @@ import { assert, assign, object, optional, string } from "superstruct"; import { fireEvent } from "../../../../common/dom/fire_event"; import { SchemaUnion } from "../../../../components/ha-form/types"; import "../../../../components/ha-theme-picker"; -import { HomeAssistant, ValueChangedEvent } from "../../../../types"; +import { HomeAssistant } from "../../../../types"; import { PictureCardConfig } from "../../cards/types"; import "../../components/hui-action-editor"; import { LovelaceCardEditor } from "../../types"; import { actionConfigStruct } from "../structs/action-struct"; import { baseLovelaceCardConfig } from "../structs/base-card-struct"; -import "../../../../components/ha-picture-upload"; -import type { HaPictureUpload } from "../../../../components/ha-picture-upload"; const cardConfigStruct = assign( baseLovelaceCardConfig, @@ -26,7 +24,7 @@ const cardConfigStruct = assign( ); const SCHEMA = [ - { name: "image", selector: { text: {} } }, + { name: "image", selector: { image: {} } }, { name: "image_entity", selector: { entity: { domain: "image" } } }, { name: "alt_text", selector: { text: {} } }, { name: "theme", selector: { theme: {} } }, @@ -60,15 +58,6 @@ export class HuiPictureCardEditor } return html` - - ) { - const picture = (ev.target as HaPictureUpload).value; - if (picture) { - fireEvent(this, "config-changed", { - config: { ...this._config!, image: picture }, - }); - } - } - private _computeLabelCallback = (schema: SchemaUnion) => { switch (schema.name) { case "theme": diff --git a/src/panels/lovelace/editor/config-elements/hui-picture-entity-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-picture-entity-card-editor.ts index bf5ffe1539d6..5cc9d84edf0b 100644 --- a/src/panels/lovelace/editor/config-elements/hui-picture-entity-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-picture-entity-card-editor.ts @@ -32,7 +32,7 @@ const cardConfigStruct = assign( const SCHEMA = [ { name: "entity", required: true, selector: { entity: {} } }, { name: "name", selector: { text: {} } }, - { name: "image", selector: { text: {} } }, + { name: "image", selector: { image: {} } }, { name: "camera_image", selector: { entity: { domain: "camera" } } }, { name: "", diff --git a/src/panels/lovelace/editor/config-elements/hui-picture-glance-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-picture-glance-card-editor.ts index 5d4d15c431a2..1c74428d3848 100644 --- a/src/panels/lovelace/editor/config-elements/hui-picture-glance-card-editor.ts +++ b/src/panels/lovelace/editor/config-elements/hui-picture-glance-card-editor.ts @@ -35,7 +35,7 @@ const cardConfigStruct = assign( const SCHEMA = [ { name: "title", selector: { text: {} } }, - { name: "image", selector: { text: {} } }, + { name: "image", selector: { image: {} } }, { name: "image_entity", selector: { entity: { domain: "image" } } }, { name: "camera_image", selector: { entity: { domain: "camera" } } }, { From 9c1ac5bd92d1f15d6344bdbc0c3290f64a4b94f9 Mon Sep 17 00:00:00 2001 From: karwosts Date: Wed, 22 Nov 2023 07:26:12 -0800 Subject: [PATCH 3/9] lint --- src/components/ha-selector/ha-selector-image.ts | 6 +++++- src/translations/en.json | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/ha-selector/ha-selector-image.ts b/src/components/ha-selector/ha-selector-image.ts index e3effc860855..7152bb0758e9 100644 --- a/src/components/ha-selector/ha-selector-image.ts +++ b/src/components/ha-selector/ha-selector-image.ts @@ -49,7 +49,11 @@ export class HaImageSelector extends LitElement { diff --git a/src/translations/en.json b/src/translations/en.json index 1a04fdcb712c..d7da83ac4253 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -412,6 +412,10 @@ "manual": "Manual Entry" } }, + "image": { + "upload_on": "Show Upload Form", + "upload_off": "Hide Upload Form" + }, "text": { "show_password": "Show password", "hide_password": "Hide password" From 2de16e7dc4e897a232479c173d2aaef02465201a Mon Sep 17 00:00:00 2001 From: karwosts Date: Thu, 7 Dec 2023 08:35:04 -0800 Subject: [PATCH 4/9] Add delete button to picture-upload --- src/components/ha-picture-upload.ts | 94 ++++++++++++++++++----------- src/data/image_upload.ts | 16 ++++- src/resources/styles.ts | 1 + 3 files changed, 76 insertions(+), 35 deletions(-) diff --git a/src/components/ha-picture-upload.ts b/src/components/ha-picture-upload.ts index 748da3917265..177a192c75ff 100644 --- a/src/components/ha-picture-upload.ts +++ b/src/components/ha-picture-upload.ts @@ -2,7 +2,13 @@ import { mdiImagePlus } from "@mdi/js"; import { LitElement, TemplateResult, css, html } from "lit"; import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; -import { createImage, generateImageThumbnailUrl } from "../data/image_upload"; +import { haStyle } from "../resources/styles"; +import { + createImage, + deleteImage, + generateImageThumbnailUrl, + getIdFromUrl, +} from "../data/image_upload"; import { showAlertDialog } from "../dialogs/generic/show-dialog-box"; import { CropOptions, @@ -62,13 +68,21 @@ export class HaPictureUpload extends LitElement { alt=${this.currentImageAltText || this.hass.localize("ui.components.picture-upload.current_image_alt")} /> - - +
+ + + + +
`; } @@ -78,6 +92,15 @@ export class HaPictureUpload extends LitElement { fireEvent(this, "change"); } + private async _handleDelete() { + const id = getIdFromUrl(this.value!); + if (id) { + await deleteImage(this.hass, id); + this.value = null; + fireEvent(this, "change"); + } + } + private async _handleFilePicked(ev) { const file = ev.detail.files[0]; if (this.crop) { @@ -140,32 +163,35 @@ export class HaPictureUpload extends LitElement { } static get styles() { - return css` - :host { - display: block; - height: 240px; - } - ha-file-upload { - height: 100%; - } - .center-vertical { - display: flex; - align-items: center; - height: 100%; - } - .value { - width: 100%; - display: flex; - flex-direction: column; - align-items: center; - } - img { - max-width: 100%; - max-height: 200px; - margin-bottom: 4px; - border-radius: var(--file-upload-image-border-radius); - } - `; + return [ + haStyle, + css` + :host { + display: block; + height: 240px; + } + ha-file-upload { + height: 100%; + } + .center-vertical { + display: flex; + align-items: center; + height: 100%; + } + .value { + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + } + img { + max-width: 100%; + max-height: 200px; + margin-bottom: 4px; + border-radius: var(--file-upload-image-border-radius); + } + `, + ]; } } diff --git a/src/data/image_upload.ts b/src/data/image_upload.ts index 0d549e8ccf61..ff4895a496db 100644 --- a/src/data/image_upload.ts +++ b/src/data/image_upload.ts @@ -8,10 +8,24 @@ interface Image { id: string; } +const URL_PREFIX = "/api/image/serve/"; + export interface ImageMutableParams { name: string; } +export const getIdFromUrl = (url: string): string | undefined => { + let id; + if (url.startsWith(URL_PREFIX)) { + id = url.substring(URL_PREFIX.length); + const idx = id.indexOf("/"); + if (idx >= 0) { + id = id.substring(0, idx); + } + } + return id; +}; + export const generateImageThumbnailUrl = ( mediaId: string, size?: number, @@ -61,5 +75,5 @@ export const updateImage = ( export const deleteImage = (hass: HomeAssistant, id: string) => hass.callWS({ type: "image/delete", - media_id: id, + image_id: id, }); diff --git a/src/resources/styles.ts b/src/resources/styles.ts index a2ed64635e5b..ba0b56164fb4 100644 --- a/src/resources/styles.ts +++ b/src/resources/styles.ts @@ -82,6 +82,7 @@ export const haStyle = css` color: var(--error-color); } + ha-button.warning, mwc-button.warning { --mdc-theme-primary: var(--error-color); } From c41257bcfd6f0553572bbe901162775aa3e4e38f Mon Sep 17 00:00:00 2001 From: karwosts Date: Thu, 7 Dec 2023 12:31:44 -0800 Subject: [PATCH 5/9] updates from feedback --- src/components/ha-picture-upload.ts | 18 +-- .../ha-selector/ha-selector-image.ts | 105 +++++++++++------- src/data/image_upload.ts | 2 +- src/translations/en.json | 5 +- 4 files changed, 81 insertions(+), 49 deletions(-) diff --git a/src/components/ha-picture-upload.ts b/src/components/ha-picture-upload.ts index 177a192c75ff..f7045bd50150 100644 --- a/src/components/ha-picture-upload.ts +++ b/src/components/ha-picture-upload.ts @@ -1,5 +1,5 @@ import { mdiImagePlus } from "@mdi/js"; -import { LitElement, TemplateResult, css, html } from "lit"; +import { LitElement, TemplateResult, css, html, nothing } from "lit"; import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { haStyle } from "../resources/styles"; @@ -35,6 +35,8 @@ export class HaPictureUpload extends LitElement { @property({ type: Boolean }) public crop = false; + @property({ type: Boolean }) public canDelete = false; + @property({ attribute: false }) public cropOptions?: CropOptions; @property({ type: Boolean }) public original = false; @@ -76,12 +78,14 @@ export class HaPictureUpload extends LitElement { )} > - - + ${this.canDelete + ? html` + ` + : nothing} `; diff --git a/src/components/ha-selector/ha-selector-image.ts b/src/components/ha-selector/ha-selector-image.ts index 7152bb0758e9..486762648b44 100644 --- a/src/components/ha-selector/ha-selector-image.ts +++ b/src/components/ha-selector/ha-selector-image.ts @@ -1,5 +1,4 @@ -import { mdiUpload, mdiUploadOff } from "@mdi/js"; -import { css, CSSResultGroup, html, nothing, LitElement } from "lit"; +import { css, CSSResultGroup, html, LitElement } from "lit"; import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../../common/dom/fire_event"; import { ImageSelector } from "../../data/selector"; @@ -8,7 +7,9 @@ import "../ha-icon-button"; import "../ha-textarea"; import "../ha-textfield"; import "../ha-picture-upload"; +import "../ha-radio"; import type { HaPictureUpload } from "../ha-picture-upload"; +import { URL_PREFIX } from "../../data/image_upload"; @customElement("ha-selector-image") export class HaImageSelector extends LitElement { @@ -32,52 +33,74 @@ export class HaImageSelector extends LitElement { @state() private showUpload = false; + protected firstUpdated(changedProps): void { + super.firstUpdated(changedProps); + + if (!this.value || this.value.startsWith(URL_PREFIX)) { + this.showUpload = true; + } + } + protected render() { return html` -
- - - +
+ + ${!this.showUpload + ? html` + + ` + : html` + + `}
- ${this.showUpload - ? html` - - ` - : nothing} `; } - private _handleUploadToggle() { - this.showUpload = !this.showUpload; + private _radioGroupPicked(ev): void { + this.showUpload = ev.target.value === "upload"; } private _pictureChanged(ev) { const value = (ev.target as HaPictureUpload).value; - if (value) { - fireEvent(this, "value-changed", { value }); - } + + fireEvent(this, "value-changed", { value: value ?? undefined }); } private _handleChange(ev) { @@ -100,7 +123,11 @@ export class HaImageSelector extends LitElement { } div { display: flex; - align-items: center; + flex-direction: column; + } + label { + display: flex; + flex-direction: column; } ha-textarea, ha-textfield { diff --git a/src/data/image_upload.ts b/src/data/image_upload.ts index ff4895a496db..d9e93095f50e 100644 --- a/src/data/image_upload.ts +++ b/src/data/image_upload.ts @@ -8,7 +8,7 @@ interface Image { id: string; } -const URL_PREFIX = "/api/image/serve/"; +export const URL_PREFIX = "/api/image/serve/"; export interface ImageMutableParams { name: string; diff --git a/src/translations/en.json b/src/translations/en.json index d7da83ac4253..bfbfca4985c2 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -413,8 +413,9 @@ } }, "image": { - "upload_on": "Show Upload Form", - "upload_off": "Hide Upload Form" + "select_image": "Select image", + "upload": "Upload picture", + "url": "Local path or web URL" }, "text": { "show_password": "Show password", From 893d2ef181bee4df91ecf017041dc814507e7e78 Mon Sep 17 00:00:00 2001 From: karwosts Date: Fri, 16 Feb 2024 16:33:57 -0800 Subject: [PATCH 6/9] fix lint --- src/components/ha-selector/ha-selector-image.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ha-selector/ha-selector-image.ts b/src/components/ha-selector/ha-selector-image.ts index 486762648b44..504a61cbe4e1 100644 --- a/src/components/ha-selector/ha-selector-image.ts +++ b/src/components/ha-selector/ha-selector-image.ts @@ -13,7 +13,7 @@ import { URL_PREFIX } from "../../data/image_upload"; @customElement("ha-selector-image") export class HaImageSelector extends LitElement { - @property() public hass!: HomeAssistant; + @property({ attribute: false }) public hass!: HomeAssistant; @property() public value?: any; @@ -25,7 +25,7 @@ export class HaImageSelector extends LitElement { @property() public helper?: string; - @property() public selector!: ImageSelector; + @property({ attribute: false }) public selector!: ImageSelector; @property({ type: Boolean }) public disabled = false; From 84ec7be633a504113d3374f0c11ec357e38e192c Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Fri, 19 Apr 2024 19:48:12 -0700 Subject: [PATCH 7/9] Update en.json --- src/translations/en.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/translations/en.json b/src/translations/en.json index bfbfca4985c2..83e115d2ee23 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -377,6 +377,11 @@ "upload_failed": "Upload failed", "unknown_file": "Unknown file" }, + "image": { + "select_image": "Select image", + "upload": "Upload picture", + "url": "Local path or web URL" + }, "location": { "latitude": "[%key:ui::panel::config::zone::detail::latitude%]", "longitude": "[%key:ui::panel::config::zone::detail::longitude%]", From 2a88f526f714b03188f238e4f724dea149d01748 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Fri, 19 Apr 2024 19:55:42 -0700 Subject: [PATCH 8/9] Update selector.ts --- src/data/selector.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/data/selector.ts b/src/data/selector.ts index 4396754ec669..10adc80ba790 100644 --- a/src/data/selector.ts +++ b/src/data/selector.ts @@ -257,17 +257,17 @@ export interface IconSelector { } | null; } +export interface ImageSelector { + // eslint-disable-next-line @typescript-eslint/ban-types + image: {} | null; +} + export interface LabelSelector { label: { multiple?: boolean; }; } -export interface ImageSelector { - // eslint-disable-next-line @typescript-eslint/ban-types - image: {} | null; -} - export interface LanguageSelector { language: { languages?: string[]; From aaaf3aff8ce0a030870ae803f7a85fd29a197493 Mon Sep 17 00:00:00 2001 From: karwosts Date: Thu, 25 Apr 2024 10:56:13 -0700 Subject: [PATCH 9/9] remove delete --- src/components/ha-picture-upload.ts | 28 ++----------------- .../ha-selector/ha-selector-image.ts | 1 - 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/src/components/ha-picture-upload.ts b/src/components/ha-picture-upload.ts index f7045bd50150..efb96c1eb239 100644 --- a/src/components/ha-picture-upload.ts +++ b/src/components/ha-picture-upload.ts @@ -1,14 +1,9 @@ import { mdiImagePlus } from "@mdi/js"; -import { LitElement, TemplateResult, css, html, nothing } from "lit"; +import { LitElement, TemplateResult, css, html } from "lit"; import { customElement, property, state } from "lit/decorators"; import { fireEvent } from "../common/dom/fire_event"; import { haStyle } from "../resources/styles"; -import { - createImage, - deleteImage, - generateImageThumbnailUrl, - getIdFromUrl, -} from "../data/image_upload"; +import { createImage, generateImageThumbnailUrl } from "../data/image_upload"; import { showAlertDialog } from "../dialogs/generic/show-dialog-box"; import { CropOptions, @@ -35,8 +30,6 @@ export class HaPictureUpload extends LitElement { @property({ type: Boolean }) public crop = false; - @property({ type: Boolean }) public canDelete = false; - @property({ attribute: false }) public cropOptions?: CropOptions; @property({ type: Boolean }) public original = false; @@ -78,14 +71,6 @@ export class HaPictureUpload extends LitElement { )} > - ${this.canDelete - ? html` - ` - : nothing}
`; @@ -96,15 +81,6 @@ export class HaPictureUpload extends LitElement { fireEvent(this, "change"); } - private async _handleDelete() { - const id = getIdFromUrl(this.value!); - if (id) { - await deleteImage(this.hass, id); - this.value = null; - fireEvent(this, "change"); - } - } - private async _handleFilePicked(ev) { const file = ev.detail.files[0]; if (this.crop) { diff --git a/src/components/ha-selector/ha-selector-image.ts b/src/components/ha-selector/ha-selector-image.ts index 504a61cbe4e1..80eccaf7870f 100644 --- a/src/components/ha-selector/ha-selector-image.ts +++ b/src/components/ha-selector/ha-selector-image.ts @@ -83,7 +83,6 @@ export class HaImageSelector extends LitElement { ` : html`