mirror of
https://github.com/home-assistant/core.git
synced 2025-11-10 11:29:46 +00:00
Add model to august device_info (#32187)
* Add model to august device_info * Address review comments from PR#32125 * Fix test name
This commit is contained in:
@@ -104,6 +104,7 @@ class AugustDoorBinarySensor(BinarySensorDevice):
|
||||
self._state = None
|
||||
self._available = False
|
||||
self._firmware_version = None
|
||||
self._model = None
|
||||
|
||||
@property
|
||||
def available(self):
|
||||
@@ -139,6 +140,7 @@ class AugustDoorBinarySensor(BinarySensorDevice):
|
||||
if detail is not None:
|
||||
lock_door_state = detail.door_state
|
||||
self._firmware_version = detail.firmware_version
|
||||
self._model = detail.model
|
||||
|
||||
self._available = lock_door_state != LockDoorStatus.UNKNOWN
|
||||
self._state = lock_door_state == LockDoorStatus.OPEN
|
||||
@@ -156,6 +158,7 @@ class AugustDoorBinarySensor(BinarySensorDevice):
|
||||
"name": self._door.device_name,
|
||||
"manufacturer": DEFAULT_NAME,
|
||||
"sw_version": self._firmware_version,
|
||||
"model": self._model,
|
||||
}
|
||||
|
||||
|
||||
@@ -170,6 +173,7 @@ class AugustDoorbellBinarySensor(BinarySensorDevice):
|
||||
self._state = None
|
||||
self._available = False
|
||||
self._firmware_version = None
|
||||
self._model = None
|
||||
|
||||
@property
|
||||
def available(self):
|
||||
@@ -210,6 +214,7 @@ class AugustDoorbellBinarySensor(BinarySensorDevice):
|
||||
self._state = None
|
||||
if detail is not None:
|
||||
self._firmware_version = detail.firmware_version
|
||||
self._model = detail.model
|
||||
self._state = await async_state_provider(self._data, detail)
|
||||
|
||||
@property
|
||||
@@ -228,4 +233,5 @@ class AugustDoorbellBinarySensor(BinarySensorDevice):
|
||||
"name": self._doorbell.device_name,
|
||||
"manufacturer": "August",
|
||||
"sw_version": self._firmware_version,
|
||||
"model": self._model,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user