mirror of
https://github.com/home-assistant/core.git
synced 2025-08-12 17:15:19 +02:00
Add bluetooth address to august (#103177)
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
from abc import abstractmethod
|
||||
|
||||
from yalexs.doorbell import Doorbell
|
||||
from yalexs.lock import Lock
|
||||
from yalexs.lock import Lock, LockDetail
|
||||
from yalexs.util import get_configuration_url
|
||||
|
||||
from homeassistant.const import ATTR_CONNECTIONS
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers import device_registry as dr
|
||||
from homeassistant.helpers.device_registry import DeviceInfo
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
@@ -26,15 +28,18 @@ class AugustEntityMixin(Entity):
|
||||
super().__init__()
|
||||
self._data = data
|
||||
self._device = device
|
||||
detail = self._detail
|
||||
self._attr_device_info = DeviceInfo(
|
||||
identifiers={(DOMAIN, self._device_id)},
|
||||
manufacturer=MANUFACTURER,
|
||||
model=self._detail.model,
|
||||
model=detail.model,
|
||||
name=device.device_name,
|
||||
sw_version=self._detail.firmware_version,
|
||||
sw_version=detail.firmware_version,
|
||||
suggested_area=_remove_device_types(device.device_name, DEVICE_TYPES),
|
||||
configuration_url=get_configuration_url(data.brand),
|
||||
)
|
||||
if isinstance(detail, LockDetail) and (mac := detail.mac_address):
|
||||
self._attr_device_info[ATTR_CONNECTIONS] = {(dr.CONNECTION_BLUETOOTH, mac)}
|
||||
|
||||
@property
|
||||
def _device_id(self):
|
||||
|
Reference in New Issue
Block a user