From 64d6fa8e8623a75e3e84b5bf30937dd6851b955a Mon Sep 17 00:00:00 2001 From: Markus Jankowski Date: Thu, 6 Jun 2019 18:11:38 +0200 Subject: [PATCH] Remove attribute lowBat (#24323) --- homeassistant/components/homematicip_cloud/binary_sensor.py | 4 +++- homeassistant/components/homematicip_cloud/device.py | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/homematicip_cloud/binary_sensor.py b/homeassistant/components/homematicip_cloud/binary_sensor.py index b006ec80686..ba30591dc6d 100644 --- a/homeassistant/components/homematicip_cloud/binary_sensor.py +++ b/homeassistant/components/homematicip_cloud/binary_sensor.py @@ -23,6 +23,7 @@ from .device import ATTR_GROUP_MEMBER_UNREACHABLE _LOGGER = logging.getLogger(__name__) +ATTR_LOW_BATTERY = 'low_battery' ATTR_MOTIONDETECTED = 'motion detected' ATTR_PRESENCEDETECTED = 'presence detected' ATTR_POWERMAINSFAILURE = 'power mains failure' @@ -312,7 +313,8 @@ class HomematicipSecuritySensorGroup(HomematicipSecurityZoneSensorGroup, attr[ATTR_MOISTUREDETECTED] = True if self._device.waterlevelDetected: attr[ATTR_WATERLEVELDETECTED] = True - + if self._device.lowBat: + attr[ATTR_LOW_BATTERY] = True if self._device.smokeDetectorAlarmType is not None and \ self._device.smokeDetectorAlarmType != \ SmokeDetectorAlarmType.IDLE_OFF: diff --git a/homeassistant/components/homematicip_cloud/device.py b/homeassistant/components/homematicip_cloud/device.py index 2c77d225263..57e04d1f32c 100644 --- a/homeassistant/components/homematicip_cloud/device.py +++ b/homeassistant/components/homematicip_cloud/device.py @@ -10,7 +10,6 @@ from homeassistant.helpers.entity import Entity _LOGGER = logging.getLogger(__name__) -ATTR_LOW_BATTERY = 'low_battery' ATTR_MODEL_TYPE = 'model_type' # RSSI HAP -> Device ATTR_RSSI_DEVICE = 'rssi_device' @@ -96,8 +95,6 @@ class HomematicipGenericDevice(Entity): def device_state_attributes(self): """Return the state attributes of the generic device.""" attr = {ATTR_MODEL_TYPE: self._device.modelType} - if hasattr(self._device, 'lowBat') and self._device.lowBat: - attr[ATTR_LOW_BATTERY] = self._device.lowBat if hasattr(self._device, 'sabotage') and self._device.sabotage: attr[ATTR_SABOTAGE] = self._device.sabotage if hasattr(self._device, 'rssiDeviceValue') and \