Add device_info to enable HA-devices for Homematic IP (#21241)

* add device_info to device

* added checks

* Fixes based on feedback

* Fix spelling

* Simplified implementation

On homematicip devices and the ap are created

* small fix with device.id

* hub/ap device creation moved to __init__.py

* Fixed result handling

* fixes after review.

* Fix test
This commit is contained in:
Markus Jankowski authored and Paulus Schoutsen committed 2019-02-27 11:25:11 -08:00
1 parent 9066609d23
commit 9b3a3fc1ac
4 files changed
+51 -4

No files matched your search

@@ -65,6 +65,17 @@ class HomematicipAccesspointStatus(HomematicipGenericDevice):
"""Initialize access point device."""
super().__init__(home, home)
@property
def device_info(self):
"""Return device specific attributes."""
# Adds a sensor to the existing HAP device
return {
'identifiers': {
# Serial numbers of Homematic IP device
(HMIPC_DOMAIN, self._device.id)
}
}
@property
def icon(self):
"""Return the icon of the access point device."""