mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-10 19:06:36 +00:00
Fix picture-glance crash when state unavailable. (#1425)
* Fix picture-glance crash when state unavailable. * Replace this.hass with hass, available check also for dialog-entities * Lint
This commit is contained in:
parent
bb7dc76996
commit
e51177b3c2
@ -137,7 +137,8 @@ class HuiPictureGlanceCard extends NavigateMixin(LocalizeMixin(EventsMixin(Polym
|
|||||||
return config.entities;
|
return config.entities;
|
||||||
}
|
}
|
||||||
|
|
||||||
return config.entities.filter(entity => !entitiesService.includes(entity));
|
return config.entities.filter(entity => !entitiesService.includes(entity) &&
|
||||||
|
(entity in hass.states));
|
||||||
}
|
}
|
||||||
|
|
||||||
_computeEntitiesService(hass, config) {
|
_computeEntitiesService(hass, config) {
|
||||||
@ -146,7 +147,7 @@ class HuiPictureGlanceCard extends NavigateMixin(LocalizeMixin(EventsMixin(Polym
|
|||||||
}
|
}
|
||||||
|
|
||||||
return config.entities.filter(entity =>
|
return config.entities.filter(entity =>
|
||||||
canToggleState(this.hass, this.hass.states[entity]));
|
(entity in hass.states) && canToggleState(hass, hass.states[entity]));
|
||||||
}
|
}
|
||||||
|
|
||||||
_showEntity(entityId, states) {
|
_showEntity(entityId, states) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user