From f34b84a5cf0dead8a5057f63bf435a84640f0554 Mon Sep 17 00:00:00 2001 From: Sander Date: Tue, 20 Aug 2019 19:59:01 +0200 Subject: [PATCH] add id to state attributes (#26086) --- homeassistant/components/homematicip_cloud/device.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/homematicip_cloud/device.py b/homeassistant/components/homematicip_cloud/device.py index 021c264f63f..6ff39c8b3a7 100644 --- a/homeassistant/components/homematicip_cloud/device.py +++ b/homeassistant/components/homematicip_cloud/device.py @@ -11,6 +11,7 @@ from homeassistant.helpers.entity import Entity _LOGGER = logging.getLogger(__name__) ATTR_MODEL_TYPE = "model_type" +ATTR_ID = "id" # RSSI HAP -> Device ATTR_RSSI_DEVICE = "rssi_device" # RSSI Device -> HAP @@ -93,7 +94,8 @@ class HomematicipGenericDevice(Entity): @property def device_state_attributes(self): """Return the state attributes of the generic device.""" - attr = {ATTR_MODEL_TYPE: self._device.modelType} + attr = {ATTR_MODEL_TYPE: self._device.modelType, ATTR_ID: self._device.id} + if hasattr(self._device, "sabotage") and self._device.sabotage: attr[ATTR_SABOTAGE] = self._device.sabotage if hasattr(self._device, "rssiDeviceValue") and self._device.rssiDeviceValue: