mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Remove attribute lowBat (#24323)
This commit is contained in:
parent
3b4a9a337b
commit
64d6fa8e86
@ -23,6 +23,7 @@ from .device import ATTR_GROUP_MEMBER_UNREACHABLE
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
ATTR_LOW_BATTERY = 'low_battery'
|
||||||
ATTR_MOTIONDETECTED = 'motion detected'
|
ATTR_MOTIONDETECTED = 'motion detected'
|
||||||
ATTR_PRESENCEDETECTED = 'presence detected'
|
ATTR_PRESENCEDETECTED = 'presence detected'
|
||||||
ATTR_POWERMAINSFAILURE = 'power mains failure'
|
ATTR_POWERMAINSFAILURE = 'power mains failure'
|
||||||
@ -312,7 +313,8 @@ class HomematicipSecuritySensorGroup(HomematicipSecurityZoneSensorGroup,
|
|||||||
attr[ATTR_MOISTUREDETECTED] = True
|
attr[ATTR_MOISTUREDETECTED] = True
|
||||||
if self._device.waterlevelDetected:
|
if self._device.waterlevelDetected:
|
||||||
attr[ATTR_WATERLEVELDETECTED] = True
|
attr[ATTR_WATERLEVELDETECTED] = True
|
||||||
|
if self._device.lowBat:
|
||||||
|
attr[ATTR_LOW_BATTERY] = True
|
||||||
if self._device.smokeDetectorAlarmType is not None and \
|
if self._device.smokeDetectorAlarmType is not None and \
|
||||||
self._device.smokeDetectorAlarmType != \
|
self._device.smokeDetectorAlarmType != \
|
||||||
SmokeDetectorAlarmType.IDLE_OFF:
|
SmokeDetectorAlarmType.IDLE_OFF:
|
||||||
|
@ -10,7 +10,6 @@ from homeassistant.helpers.entity import Entity
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
ATTR_LOW_BATTERY = 'low_battery'
|
|
||||||
ATTR_MODEL_TYPE = 'model_type'
|
ATTR_MODEL_TYPE = 'model_type'
|
||||||
# RSSI HAP -> Device
|
# RSSI HAP -> Device
|
||||||
ATTR_RSSI_DEVICE = 'rssi_device'
|
ATTR_RSSI_DEVICE = 'rssi_device'
|
||||||
@ -96,8 +95,6 @@ class HomematicipGenericDevice(Entity):
|
|||||||
def device_state_attributes(self):
|
def device_state_attributes(self):
|
||||||
"""Return the state attributes of the generic device."""
|
"""Return the state attributes of the generic device."""
|
||||||
attr = {ATTR_MODEL_TYPE: self._device.modelType}
|
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:
|
if hasattr(self._device, 'sabotage') and self._device.sabotage:
|
||||||
attr[ATTR_SABOTAGE] = self._device.sabotage
|
attr[ATTR_SABOTAGE] = self._device.sabotage
|
||||||
if hasattr(self._device, 'rssiDeviceValue') and \
|
if hasattr(self._device, 'rssiDeviceValue') and \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user