Update Rachio hose timer battery sensor (#118045)
parent
0b4f1cff98
commit
080bba5d9b
|
@ -20,6 +20,7 @@ from .const import (
|
|||
KEY_DEVICE_ID,
|
||||
KEY_LOW,
|
||||
KEY_RAIN_SENSOR_TRIPPED,
|
||||
KEY_REPLACE,
|
||||
KEY_REPORTED_STATE,
|
||||
KEY_STATE,
|
||||
KEY_STATUS,
|
||||
|
@ -171,4 +172,7 @@ class RachioHoseTimerBattery(RachioHoseTimerEntity, BinarySensorEntity):
|
|||
data = self.coordinator.data[self.id]
|
||||
|
||||
self._static_attrs = data[KEY_STATE][KEY_REPORTED_STATE]
|
||||
self._attr_is_on = self._static_attrs[KEY_BATTERY_STATUS] == KEY_LOW
|
||||
self._attr_is_on = self._static_attrs[KEY_BATTERY_STATUS] in [
|
||||
KEY_LOW,
|
||||
KEY_REPLACE,
|
||||
]
|
||||
|
|
|
@ -58,6 +58,7 @@ KEY_CURRENT_STATUS = "lastWateringAction"
|
|||
KEY_DETECT_FLOW = "detectFlow"
|
||||
KEY_BATTERY_STATUS = "batteryStatus"
|
||||
KEY_LOW = "LOW"
|
||||
KEY_REPLACE = "REPLACE"
|
||||
KEY_REASON = "reason"
|
||||
KEY_DEFAULT_RUNTIME = "defaultRuntimeSeconds"
|
||||
KEY_DURATION_SECONDS = "durationSeconds"
|
||||
|
|
Loading…
Reference in New Issue