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):
|
class YaleAlarmDevice(CoordinatorEntity, AlarmControlPanelEntity):
|
||||||
"""Represent a Yale Smart Alarm."""
|
"""Represent a Yale Smart Alarm."""
|
||||||
|
|
||||||
coordinator: YaleDataUpdateCoordinator
|
def __init__(self, coordinator: YaleDataUpdateCoordinator) -> None:
|
||||||
|
"""Initialize the Yale Alarm Device."""
|
||||||
_attr_name: str = coordinator.entry.data[CONF_NAME]
|
super().__init__(coordinator)
|
||||||
_attr_unique_id: str = coordinator.entry.entry_id
|
self._attr_name: str = coordinator.entry.data[CONF_NAME]
|
||||||
_identifier: str = coordinator.entry.data[CONF_USERNAME]
|
self._attr_unique_id = coordinator.entry.entry_id
|
||||||
|
self._identifier: str = coordinator.entry.data[CONF_USERNAME]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue