Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gjohansson-ST committed May 26, 2024
1 parent 13880e5 commit a96db68
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/panels/lovelace/cards/hui-alarm-panel-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,12 @@ 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 (changedProps.has("hass")) {
const entityId = this._config?.entity;
if (entityId) {
if (oldHass?.entities[entityId] !== this.hass?.entities[entityId]) {
this._loadEntityRegistryEntry();
}
}
}
if (
Expand Down

0 comments on commit a96db68

Please sign in to comment.