Add group attribute to Homematic IP Cloud (#26618)

* Add group attribute to Homematic IP Cloud

* Fix docstring
This commit is contained in:
SukramJ authored and Martin Hjelmare committed 2019-09-14 07:12:19 +02:00
1 parent a71cd6e90e
commit 1d3f2d20d2
4 files changed
+10 -7

No files matched your search

@@ -19,7 +19,7 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from . import DOMAIN as HMIPC_DOMAIN, HMIPC_HAPID, HomematicipGenericDevice
from .device import ATTR_GROUP_MEMBER_UNREACHABLE
from .device import ATTR_GROUP_MEMBER_UNREACHABLE, ATTR_IS_GROUP
_LOGGER = logging.getLogger(__name__)
@@ -113,7 +113,7 @@ class HomematicipGroupSwitch(HomematicipGenericDevice, SwitchDevice):
@property
def device_state_attributes(self):
"""Return the state attributes of the switch-group."""
state_attr = {}
state_attr = {ATTR_IS_GROUP: True}
if self._device.unreach:
state_attr[ATTR_GROUP_MEMBER_UNREACHABLE] = True
return state_attr