Fix possibly missing changed_by in Verisure Alarm (#48867)

This commit is contained in:
Franck Nijhof
2021-04-08 19:03:11 +02:00
committed by GitHub
parent e475b6b9c3
commit 1dafea705d

View File

@@ -112,7 +112,7 @@ class VerisureAlarm(CoordinatorEntity, AlarmControlPanelEntity):
self._state = ALARM_STATE_TO_HA.get( self._state = ALARM_STATE_TO_HA.get(
self.coordinator.data["alarm"]["statusType"] self.coordinator.data["alarm"]["statusType"]
) )
self._changed_by = self.coordinator.data["alarm"]["name"] self._changed_by = self.coordinator.data["alarm"].get("name")
super()._handle_coordinator_update() super()._handle_coordinator_update()
async def async_added_to_hass(self) -> None: async def async_added_to_hass(self) -> None: