From 080bba5d9bafa0da49f35e74df726dda89699792 Mon Sep 17 00:00:00 2001 From: Brian Rogers Date: Fri, 24 May 2024 09:31:05 -0400 Subject: [PATCH] Update Rachio hose timer battery sensor (#118045) --- homeassistant/components/rachio/binary_sensor.py | 6 +++++- homeassistant/components/rachio/const.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/rachio/binary_sensor.py b/homeassistant/components/rachio/binary_sensor.py index e6248b2c93b..5a8b5856db7 100644 --- a/homeassistant/components/rachio/binary_sensor.py +++ b/homeassistant/components/rachio/binary_sensor.py @@ -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, + ] diff --git a/homeassistant/components/rachio/const.py b/homeassistant/components/rachio/const.py index b9b16c0cd87..891e92f55a1 100644 --- a/homeassistant/components/rachio/const.py +++ b/homeassistant/components/rachio/const.py @@ -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"