From 069b819679c21226f9bf873eb5be9fdc8e3a97f4 Mon Sep 17 00:00:00 2001 From: sander76 Date: Tue, 25 Sep 2018 10:15:03 +0200 Subject: [PATCH] Add unique_id to homematic_cloud (#16828) * add unique_id * add docstring and trigger travis --- homeassistant/components/homematicip_cloud/device.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/homematicip_cloud/device.py b/homeassistant/components/homematicip_cloud/device.py index 9c335befda4..6a4f958387e 100644 --- a/homeassistant/components/homematicip_cloud/device.py +++ b/homeassistant/components/homematicip_cloud/device.py @@ -61,6 +61,11 @@ class HomematicipGenericDevice(Entity): """Device available.""" return not self._device.unreach + @property + def unique_id(self): + """Return a unique ID.""" + return "{}_{}".format(self.__class__.__name__, self._device.id) + @property def icon(self): """Return the icon."""