Add HomematicIP SMI55 device (#19400)
parent
18b7f74ad7
commit
b80bed64f5
|
@ -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))
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue