Skip to content

Commit

Permalink
fix: ensure a first hass is set to the child. Fixes #36
Browse files Browse the repository at this point in the history
  • Loading branch information
brunosabot committed Jan 21, 2025
1 parent 6a7acfa commit 0ec84f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/streamline-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 0ec84f2

Please sign in to comment.