From 0ec84f2eacb172c9a0c4480b6b0aaa691ca55275 Mon Sep 17 00:00:00 2001 From: Bruno Sabot Date: Tue, 21 Jan 2025 20:37:38 +0100 Subject: [PATCH] fix: ensure a first hass is set to the child. Fixes #36 --- src/streamline-card.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/streamline-card.js b/src/streamline-card.js index b769074..87c97a3 100644 --- a/src/streamline-card.js +++ b/src/streamline-card.js @@ -26,7 +26,10 @@ import { version } from "../package.json"; } updateCardHass() { - if (this._isConnected && this._card && this._hass) { + if ( + (this._isConnected && this._card && this._hass) || + (this._hass && this._card.hass === undefined) + ) { this._card.hass = this._hass; } }