From 2f8048942822718ef0ed49538b6a7c8398f48bdb Mon Sep 17 00:00:00 2001 From: SukramJ Date: Sun, 15 Mar 2020 19:01:50 +0100 Subject: [PATCH] Add SF transition to HmIP-BSL and remove obsolete code in HMIPC (#32833) --- homeassistant/components/homematicip_cloud/hap.py | 5 ----- homeassistant/components/homematicip_cloud/light.py | 3 ++- .../components/homematicip_cloud/test_alarm_control_panel.py | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/homematicip_cloud/hap.py b/homeassistant/components/homematicip_cloud/hap.py index 0d6fc726050..dd85827f1ae 100644 --- a/homeassistant/components/homematicip_cloud/hap.py +++ b/homeassistant/components/homematicip_cloud/hap.py @@ -137,11 +137,6 @@ class HomematicipHAP: job = self.hass.async_create_task(self.get_state()) job.add_done_callback(self.get_state_finished) self._accesspoint_connected = True - else: - # Update home with the given json from arg[0], - # without devices and groups. - - self.home.update_home_only(args[0]) @callback def async_create_entity(self, *args, **kwargs) -> None: diff --git a/homeassistant/components/homematicip_cloud/light.py b/homeassistant/components/homematicip_cloud/light.py index 4e081f4d8fa..cead186db95 100644 --- a/homeassistant/components/homematicip_cloud/light.py +++ b/homeassistant/components/homematicip_cloud/light.py @@ -20,6 +20,7 @@ from homeassistant.components.light import ( ATTR_TRANSITION, SUPPORT_BRIGHTNESS, SUPPORT_COLOR, + SUPPORT_TRANSITION, Light, ) from homeassistant.config_entries import ConfigEntry @@ -197,7 +198,7 @@ class HomematicipNotificationLight(HomematicipGenericDevice, Light): @property def supported_features(self) -> int: """Flag supported features.""" - return SUPPORT_BRIGHTNESS | SUPPORT_COLOR + return SUPPORT_BRIGHTNESS | SUPPORT_COLOR | SUPPORT_TRANSITION @property def unique_id(self) -> str: diff --git a/tests/components/homematicip_cloud/test_alarm_control_panel.py b/tests/components/homematicip_cloud/test_alarm_control_panel.py index 23e5beb40eb..92782f2cbb2 100644 --- a/tests/components/homematicip_cloud/test_alarm_control_panel.py +++ b/tests/components/homematicip_cloud/test_alarm_control_panel.py @@ -31,9 +31,7 @@ async def _async_manipulate_security_zones( internal_zone = home.search_group_by_id(internal_zone_id) internal_zone.active = internal_active - home.from_json(json) - home._get_functionalHomes(json) - home._load_functionalChannels() + home.update_home_only(json) home.fire_update_event(json) await hass.async_block_till_done()