From 5a9bda419a3f0cbf9f717c22edd5d5fee55bb43f Mon Sep 17 00:00:00 2001 From: Bruno Maia Date: Wed, 17 Nov 2021 19:56:30 +0000 Subject: [PATCH] Show error Icon when a entity is unknown --- cover-icon-element.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cover-icon-element.js b/cover-icon-element.js index 6245ec3..0692bca 100644 --- a/cover-icon-element.js +++ b/cover-icon-element.js @@ -8,7 +8,7 @@ class CoverIconElement extends HTMLElement { setImage(hass) { if (hass && this._config) { - let image = CoverIconElement.dataImage4(this._config.color, this._config.opacity); + let image = CoverIconElement.dataImageError(this._config.color); if (this._config.entity) { const stateObj = hass.states[this._config.entity]; @@ -30,6 +30,8 @@ class CoverIconElement extends HTMLElement { image = CoverIconElement.dataImage2(this._config.color, this._config.opacity); } else if (position >= this._config.breakpoints[0]) { image = CoverIconElement.dataImage3(this._config.color, this._config.opacity); + } else { + image = CoverIconElement.dataImage4(this._config.color, this._config.opacity); } } }