Remove attribute lowBat (#24323)

This commit is contained in:
Markus Jankowski 2019-06-06 18:11:38 +02:00 committed by Andrew Sayre
parent 3b4a9a337b
commit 64d6fa8e86
2 changed files with 3 additions and 4 deletions

View File

@ -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:

View File

@ -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 \