Skip to content

Commit

Permalink
handle update
Browse files Browse the repository at this point in the history
  • Loading branch information
gjohansson-ST committed May 26, 2024
1 parent 3121f26 commit 13880e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/panels/lovelace/cards/hui-alarm-panel-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,13 @@ class HuiAlarmPanelCard extends LitElement implements LovelaceCard {
const oldConfig = changedProps.get("_config") as
| AlarmPanelCardConfig
| undefined;
const entityId = this._config?.entity;

if (entityId) {
if (oldHass?.entities[entityId] !== this.hass?.entities[entityId]) {
this._loadEntityRegistryEntry();
}
}
if (
!oldHass ||
!oldConfig ||
Expand Down

0 comments on commit 13880e5

Please sign in to comment.