From 7a004112acac606ac1e711ab8c64a79312390aab Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Fri, 3 Feb 2023 09:03:20 +0000 Subject: [PATCH] Fix missing property in bosch_shc --- homeassistant/components/bosch_shc/entity.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/bosch_shc/entity.py b/homeassistant/components/bosch_shc/entity.py index 4ef0e37132d51..de3e2f9d3eaef 100644 --- a/homeassistant/components/bosch_shc/entity.py +++ b/homeassistant/components/bosch_shc/entity.py @@ -3,13 +3,16 @@ from boschshcpy import SHCDevice, SHCIntrusionSystem +from homeassistant.core import HomeAssistant from homeassistant.helpers.device_registry import async_get as get_dev_reg from homeassistant.helpers.entity import DeviceInfo, Entity from .const import DOMAIN -async def async_remove_devices(hass, entity, entry_id) -> None: +async def async_remove_devices( + hass: HomeAssistant, entity: SHCBaseEntity, entry_id: str +) -> None: """Get item that is removed from session.""" dev_registry = get_dev_reg(hass) device = dev_registry.async_get_device( @@ -49,6 +52,11 @@ async def async_will_remove_from_hass(self) -> None: await super().async_will_remove_from_hass() self._device.unsubscribe_callback(self.entity_id) + @property + def device_id(self) -> str: + """Return the device id.""" + return self._device.id + class SHCEntity(SHCBaseEntity): """Representation of a SHC device entity."""