Add homematicip cloud full flush measuring switch (#19247)

pull/19551/head
sander76 2018-12-25 16:43:28 +01:00 committed by Martin Hjelmare
parent 4d62e77049
commit 6b204941cf
1 changed files with 7 additions and 2 deletions

View File

@ -29,7 +29,11 @@ async def async_setup_platform(
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the HomematicIP switch from a config entry."""
from homematicip.device import (
PlugableSwitch, PlugableSwitchMeasuring, BrandSwitchMeasuring)
PlugableSwitch,
PlugableSwitchMeasuring,
BrandSwitchMeasuring,
FullFlushSwitchMeasuring,
)
home = hass.data[HMIPC_DOMAIN][config_entry.data[HMIPC_HAPID]].home
devices = []
@ -39,7 +43,8 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
# This device is implemented in the light platform and will
# not be added in the switch platform
pass
elif isinstance(device, PlugableSwitchMeasuring):
elif isinstance(device, (PlugableSwitchMeasuring,
FullFlushSwitchMeasuring)):
devices.append(HomematicipSwitchMeasuring(home, device))
elif isinstance(device, PlugableSwitch):
devices.append(HomematicipSwitch(home, device))