From b80bed64f5087a15d54e58b1ed2328baf20c865d Mon Sep 17 00:00:00 2001 From: Mattias Welponer Date: Tue, 25 Dec 2018 10:40:21 +0100 Subject: [PATCH] Add HomematicIP SMI55 device (#19400) --- homeassistant/components/binary_sensor/homematicip_cloud.py | 6 ++++-- homeassistant/components/sensor/homematicip_cloud.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/binary_sensor/homematicip_cloud.py b/homeassistant/components/binary_sensor/homematicip_cloud.py index 6c8b7ff191e..aba979b94f2 100644 --- a/homeassistant/components/binary_sensor/homematicip_cloud.py +++ b/homeassistant/components/binary_sensor/homematicip_cloud.py @@ -28,14 +28,16 @@ async def async_setup_entry(hass, config_entry, async_add_entities): """Set up the HomematicIP Cloud binary sensor from a config entry.""" from homematicip.aio.device import ( AsyncShutterContact, AsyncMotionDetectorIndoor, AsyncSmokeDetector, - AsyncWaterSensor, AsyncRotaryHandleSensor) + AsyncWaterSensor, AsyncRotaryHandleSensor, + AsyncMotionDetectorPushButton) home = hass.data[HMIPC_DOMAIN][config_entry.data[HMIPC_HAPID]].home devices = [] for device in home.devices: if isinstance(device, (AsyncShutterContact, AsyncRotaryHandleSensor)): devices.append(HomematicipShutterContact(home, device)) - elif isinstance(device, AsyncMotionDetectorIndoor): + elif isinstance(device, (AsyncMotionDetectorIndoor, + AsyncMotionDetectorPushButton)): devices.append(HomematicipMotionDetector(home, device)) elif isinstance(device, AsyncSmokeDetector): devices.append(HomematicipSmokeDetector(home, device)) diff --git a/homeassistant/components/sensor/homematicip_cloud.py b/homeassistant/components/sensor/homematicip_cloud.py index 73fef98fb76..77feda20be1 100644 --- a/homeassistant/components/sensor/homematicip_cloud.py +++ b/homeassistant/components/sensor/homematicip_cloud.py @@ -35,7 +35,8 @@ async def async_setup_entry(hass, config_entry, async_add_entities): from homematicip.aio.device import ( AsyncHeatingThermostat, AsyncTemperatureHumiditySensorWithoutDisplay, AsyncTemperatureHumiditySensorDisplay, AsyncMotionDetectorIndoor, - AsyncTemperatureHumiditySensorOutdoor) + AsyncTemperatureHumiditySensorOutdoor, + AsyncMotionDetectorPushButton) home = hass.data[HMIPC_DOMAIN][config_entry.data[HMIPC_HAPID]].home devices = [HomematicipAccesspointStatus(home)] @@ -47,7 +48,8 @@ async def async_setup_entry(hass, config_entry, async_add_entities): AsyncTemperatureHumiditySensorOutdoor)): devices.append(HomematicipTemperatureSensor(home, device)) devices.append(HomematicipHumiditySensor(home, device)) - if isinstance(device, AsyncMotionDetectorIndoor): + if isinstance(device, (AsyncMotionDetectorIndoor, + AsyncMotionDetectorPushButton)): devices.append(HomematicipIlluminanceSensor(home, device)) if devices: