From 38e3e20f746909491b842160782492040fe2e831 Mon Sep 17 00:00:00 2001 From: Jeef Date: Sun, 23 Jul 2023 15:11:07 -0600 Subject: [PATCH] Add Low Battery binary_sensor to Flume (#94914) Co-authored-by: Franck Nijhof --- homeassistant/components/flume/binary_sensor.py | 7 +++++++ homeassistant/components/flume/const.py | 1 + 2 files changed, 8 insertions(+) diff --git a/homeassistant/components/flume/binary_sensor.py b/homeassistant/components/flume/binary_sensor.py index 453e259bf46..c912c3419d7 100644 --- a/homeassistant/components/flume/binary_sensor.py +++ b/homeassistant/components/flume/binary_sensor.py @@ -25,6 +25,7 @@ from .const import ( KEY_DEVICE_TYPE, NOTIFICATION_HIGH_FLOW, NOTIFICATION_LEAK_DETECTED, + NOTIFICATION_LOW_BATTERY, ) from .coordinator import ( FlumeDeviceConnectionUpdateCoordinator, @@ -67,6 +68,12 @@ FLUME_BINARY_NOTIFICATION_SENSORS: tuple[FlumeBinarySensorEntityDescription, ... event_rule=NOTIFICATION_HIGH_FLOW, icon="mdi:waves", ), + FlumeBinarySensorEntityDescription( + key="low_battery", + entity_category=EntityCategory.DIAGNOSTIC, + device_class=BinarySensorDeviceClass.BATTERY, + event_rule=NOTIFICATION_LOW_BATTERY, + ), ) diff --git a/homeassistant/components/flume/const.py b/homeassistant/components/flume/const.py index 1889cca8fa5..9e932cce4dd 100644 --- a/homeassistant/components/flume/const.py +++ b/homeassistant/components/flume/const.py @@ -47,3 +47,4 @@ NOTIFICATION_BRIDGE_DISCONNECT = "Bridge Disconnection" BRIDGE_NOTIFICATION_KEY = "connected" BRIDGE_NOTIFICATION_RULE = "Bridge Disconnection" NOTIFICATION_LEAK_DETECTED = "Flume Smart Leak Alert" +NOTIFICATION_LOW_BATTERY = "Low Battery"