From af5b22a2653ca0bcd988ed581f5bd9b0e8a2b4b2 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 25 Mar 2021 14:17:32 +0100 Subject: [PATCH] Fix picture glance editor + small opti in hui image (#8692) --- src/panels/lovelace/components/hui-image.ts | 15 ++++++++------- .../hui-picture-glance-card-editor.ts | 9 ++++++--- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/panels/lovelace/components/hui-image.ts b/src/panels/lovelace/components/hui-image.ts index 09955676a5..9cfe450762 100644 --- a/src/panels/lovelace/components/hui-image.ts +++ b/src/panels/lovelace/components/hui-image.ts @@ -159,13 +159,14 @@ export class HuiImage extends LitElement { })} /> `} -
+ ${this._loadError + ? html`
` + : ""} `; } 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 43d4816e03..46505c232e 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 @@ -70,9 +70,12 @@ export class HuiPictureGlanceCardEditor extends LitElement } get _image(): string { - return this._config!.image || this._camera_image - ? "" - : "https://www.home-assistant.io/images/merchandise/shirt-frontpage.png"; + return ( + this._config!.image || + (this._camera_image + ? "" + : "https://www.home-assistant.io/images/merchandise/shirt-frontpage.png") + ); } get _camera_image(): string {