Add unique_id to homematic_cloud (#16828)

* add unique_id

* add docstring and trigger travis
This commit is contained in:
sander76 2018-09-25 10:15:03 +02:00 committed by Martin Hjelmare
parent 90197b6ec9
commit 069b819679

View File

@ -61,6 +61,11 @@ class HomematicipGenericDevice(Entity):
"""Device available.""" """Device available."""
return not self._device.unreach return not self._device.unreach
@property
def unique_id(self):
"""Return a unique ID."""
return "{}_{}".format(self.__class__.__name__, self._device.id)
@property @property
def icon(self): def icon(self):
"""Return the icon.""" """Return the icon."""