Add HomematicIP SMI55 device (#19400)
This commit is contained in:
parent
18b7f74ad7
commit
b80bed64f5
2 changed files with 8 additions and 4 deletions
|
@ -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."""
|
"""Set up the HomematicIP Cloud binary sensor from a config entry."""
|
||||||
from homematicip.aio.device import (
|
from homematicip.aio.device import (
|
||||||
AsyncShutterContact, AsyncMotionDetectorIndoor, AsyncSmokeDetector,
|
AsyncShutterContact, AsyncMotionDetectorIndoor, AsyncSmokeDetector,
|
||||||
AsyncWaterSensor, AsyncRotaryHandleSensor)
|
AsyncWaterSensor, AsyncRotaryHandleSensor,
|
||||||
|
AsyncMotionDetectorPushButton)
|
||||||
|
|
||||||
home = hass.data[HMIPC_DOMAIN][config_entry.data[HMIPC_HAPID]].home
|
home = hass.data[HMIPC_DOMAIN][config_entry.data[HMIPC_HAPID]].home
|
||||||
devices = []
|
devices = []
|
||||||
for device in home.devices:
|
for device in home.devices:
|
||||||
if isinstance(device, (AsyncShutterContact, AsyncRotaryHandleSensor)):
|
if isinstance(device, (AsyncShutterContact, AsyncRotaryHandleSensor)):
|
||||||
devices.append(HomematicipShutterContact(home, device))
|
devices.append(HomematicipShutterContact(home, device))
|
||||||
elif isinstance(device, AsyncMotionDetectorIndoor):
|
elif isinstance(device, (AsyncMotionDetectorIndoor,
|
||||||
|
AsyncMotionDetectorPushButton)):
|
||||||
devices.append(HomematicipMotionDetector(home, device))
|
devices.append(HomematicipMotionDetector(home, device))
|
||||||
elif isinstance(device, AsyncSmokeDetector):
|
elif isinstance(device, AsyncSmokeDetector):
|
||||||
devices.append(HomematicipSmokeDetector(home, device))
|
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 (
|
from homematicip.aio.device import (
|
||||||
AsyncHeatingThermostat, AsyncTemperatureHumiditySensorWithoutDisplay,
|
AsyncHeatingThermostat, AsyncTemperatureHumiditySensorWithoutDisplay,
|
||||||
AsyncTemperatureHumiditySensorDisplay, AsyncMotionDetectorIndoor,
|
AsyncTemperatureHumiditySensorDisplay, AsyncMotionDetectorIndoor,
|
||||||
AsyncTemperatureHumiditySensorOutdoor)
|
AsyncTemperatureHumiditySensorOutdoor,
|
||||||
|
AsyncMotionDetectorPushButton)
|
||||||
|
|
||||||
home = hass.data[HMIPC_DOMAIN][config_entry.data[HMIPC_HAPID]].home
|
home = hass.data[HMIPC_DOMAIN][config_entry.data[HMIPC_HAPID]].home
|
||||||
devices = [HomematicipAccesspointStatus(home)]
|
devices = [HomematicipAccesspointStatus(home)]
|
||||||
|
@ -47,7 +48,8 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||||
AsyncTemperatureHumiditySensorOutdoor)):
|
AsyncTemperatureHumiditySensorOutdoor)):
|
||||||
devices.append(HomematicipTemperatureSensor(home, device))
|
devices.append(HomematicipTemperatureSensor(home, device))
|
||||||
devices.append(HomematicipHumiditySensor(home, device))
|
devices.append(HomematicipHumiditySensor(home, device))
|
||||||
if isinstance(device, AsyncMotionDetectorIndoor):
|
if isinstance(device, (AsyncMotionDetectorIndoor,
|
||||||
|
AsyncMotionDetectorPushButton)):
|
||||||
devices.append(HomematicipIlluminanceSensor(home, device))
|
devices.append(HomematicipIlluminanceSensor(home, device))
|
||||||
|
|
||||||
if devices:
|
if devices:
|
||||||
|
|
Loading…
Add table
Reference in a new issue