1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add group attribute to Homematic IP Cloud (#26618)

* Add group attribute to Homematic IP Cloud

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

View File

@@ -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