Fix smoke detection for HomematicIP Cloud (#31753)

This commit is contained in:
SukramJ authored and GitHub committed 2020-02-12 10:12:26 -08:00
1 parent 3e05fc1c11
commit c0756948da
1 file changed
+5 -1
@@ -227,7 +227,11 @@ class HomematicipSmokeDetector(HomematicipGenericDevice, BinarySensorDevice):
@property
def is_on(self) -> bool:
"""Return true if smoke is detected."""
return self._device.smokeDetectorAlarmType != SmokeDetectorAlarmType.IDLE_OFF
if self._device.smokeDetectorAlarmType:
return (
self._device.smokeDetectorAlarmType != SmokeDetectorAlarmType.IDLE_OFF
)
return False
class HomematicipWaterDetector(HomematicipGenericDevice, BinarySensorDevice):