Fix minor homematicip cloud binary sensor issues (#20398)
* fix for smoke detection * a tilted window is now considered as "open"/on * changed comparison to enum * line length * insert brackets for line length and comparison * indentation should now be ok for hound changed api version to 0.10.4 * indentation should now be ok for hound changed api version to 0.10.4 * updating requirement files * satisfy lintpull/20430/head
parent
d6c12e47f4
commit
4518e6bdf7
|
@ -15,8 +15,6 @@ DEPENDENCIES = ['homematicip_cloud']
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
STATE_SMOKE_OFF = 'IDLE_OFF'
|
||||
|
||||
|
||||
async def async_setup_platform(
|
||||
hass, config, async_add_entities, discovery_info=None):
|
||||
|
@ -65,7 +63,7 @@ class HomematicipShutterContact(HomematicipGenericDevice, BinarySensorDevice):
|
|||
return True
|
||||
if self._device.windowState is None:
|
||||
return None
|
||||
return self._device.windowState == WindowState.OPEN
|
||||
return self._device.windowState != WindowState.CLOSED
|
||||
|
||||
|
||||
class HomematicipMotionDetector(HomematicipGenericDevice, BinarySensorDevice):
|
||||
|
@ -95,7 +93,9 @@ class HomematicipSmokeDetector(HomematicipGenericDevice, BinarySensorDevice):
|
|||
@property
|
||||
def is_on(self):
|
||||
"""Return true if smoke is detected."""
|
||||
return self._device.smokeDetectorAlarmType != STATE_SMOKE_OFF
|
||||
from homematicip.base.enums import SmokeDetectorAlarmType
|
||||
return (self._device.smokeDetectorAlarmType
|
||||
!= SmokeDetectorAlarmType.IDLE_OFF)
|
||||
|
||||
|
||||
class HomematicipWaterDetector(HomematicipGenericDevice, BinarySensorDevice):
|
||||
|
|
|
@ -19,7 +19,7 @@ from .const import (
|
|||
from .device import HomematicipGenericDevice # noqa: F401
|
||||
from .hap import HomematicipAuth, HomematicipHAP # noqa: F401
|
||||
|
||||
REQUIREMENTS = ['homematicip==0.10.3']
|
||||
REQUIREMENTS = ['homematicip==0.10.4']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -529,7 +529,7 @@ homeassistant-pyozw==0.1.2
|
|||
# homekit==0.12.2
|
||||
|
||||
# homeassistant.components.homematicip_cloud
|
||||
homematicip==0.10.3
|
||||
homematicip==0.10.4
|
||||
|
||||
# homeassistant.components.google
|
||||
# homeassistant.components.remember_the_milk
|
||||
|
|
|
@ -113,7 +113,7 @@ holidays==0.9.9
|
|||
home-assistant-frontend==20190121.1
|
||||
|
||||
# homeassistant.components.homematicip_cloud
|
||||
homematicip==0.10.3
|
||||
homematicip==0.10.4
|
||||
|
||||
# homeassistant.components.influxdb
|
||||
# homeassistant.components.sensor.influxdb
|
||||
|
|
Loading…
Reference in New Issue