From 6b204941cf3809c469af826883c10efa6ecb13bc Mon Sep 17 00:00:00 2001 From: sander76 Date: Tue, 25 Dec 2018 16:43:28 +0100 Subject: [PATCH] Add homematicip cloud full flush measuring switch (#19247) --- homeassistant/components/switch/homematicip_cloud.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/switch/homematicip_cloud.py b/homeassistant/components/switch/homematicip_cloud.py index e066c861dfb..a1b3e1789bf 100644 --- a/homeassistant/components/switch/homematicip_cloud.py +++ b/homeassistant/components/switch/homematicip_cloud.py @@ -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))