diff --git a/homeassistant/components/august/entity.py b/homeassistant/components/august/entity.py index 47f3b8be74f..d149e035ac4 100644 --- a/homeassistant/components/august/entity.py +++ b/homeassistant/components/august/entity.py @@ -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):