Add Low Battery binary_sensor to Flume ()

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Jeef 2023-07-23 15:11:07 -06:00 committed by GitHub
parent 9f551c0469
commit 38e3e20f74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions
homeassistant/components/flume

View file

@ -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,
),
)

View file

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