From cd99cdbc7da0b03c61dcb38bee6486540893883d Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:41:47 +0100 Subject: [PATCH] Fix missing property in bosch_shc (#87260) --- 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 4ef0e37132d..de3e2f9d3ea 100644 --- a/homeassistant/components/bosch_shc/entity.py +++ b/homeassistant/components/bosch_shc/entity.py @@ -3,13 +3,16 @@ from __future__ import annotations 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 @@ class SHCBaseEntity(Entity): 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."""