Fix coordinator not defined in yale_smart_alarm (#53973)
* Bugfix coordinator not defined * Apply suggestions from code review Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
6eae5231f1
commit
4ef859a9a9
1 changed files with 6 additions and 5 deletions
|
@ -86,11 +86,12 @@ async def async_setup_entry(
|
|||
class YaleAlarmDevice(CoordinatorEntity, AlarmControlPanelEntity):
|
||||
"""Represent a Yale Smart Alarm."""
|
||||
|
||||
coordinator: YaleDataUpdateCoordinator
|
||||
|
||||
_attr_name: str = coordinator.entry.data[CONF_NAME]
|
||||
_attr_unique_id: str = coordinator.entry.entry_id
|
||||
_identifier: str = coordinator.entry.data[CONF_USERNAME]
|
||||
def __init__(self, coordinator: YaleDataUpdateCoordinator) -> None:
|
||||
"""Initialize the Yale Alarm Device."""
|
||||
super().__init__(coordinator)
|
||||
self._attr_name: str = coordinator.entry.data[CONF_NAME]
|
||||
self._attr_unique_id = coordinator.entry.entry_id
|
||||
self._identifier: str = coordinator.entry.data[CONF_USERNAME]
|
||||
|
||||
@property
|
||||
def device_info(self) -> DeviceInfo:
|
||||
|
|
Loading…
Add table
Reference in a new issue