From cef7ce11ad0e5016d85b2fdbc5058f99874f23f9 Mon Sep 17 00:00:00 2001 From: Markus Jankowski Date: Fri, 26 Apr 2019 00:12:36 +0200 Subject: [PATCH] check if sabotage attr is in device (#23397) --- homeassistant/components/homematicip_cloud/binary_sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/homematicip_cloud/binary_sensor.py b/homeassistant/components/homematicip_cloud/binary_sensor.py index 1396493a527..dee43e3f367 100644 --- a/homeassistant/components/homematicip_cloud/binary_sensor.py +++ b/homeassistant/components/homematicip_cloud/binary_sensor.py @@ -78,7 +78,7 @@ class HomematicipShutterContact(HomematicipGenericDevice, BinarySensorDevice): @property def is_on(self): """Return true if the shutter contact is on/open.""" - if self._device.sabotage: + if hasattr(self._device, 'sabotage') and self._device.sabotage: return True if self._device.windowState is None: return None @@ -96,7 +96,7 @@ class HomematicipMotionDetector(HomematicipGenericDevice, BinarySensorDevice): @property def is_on(self): """Return true if motion is detected.""" - if self._device.sabotage: + if hasattr(self._device, 'sabotage') and self._device.sabotage: return True return self._device.motionDetected