From c3ca9f3ad1744e8b3c074ff9959502fcafec2167 Mon Sep 17 00:00:00 2001 From: Nathan Spencer Date: Sat, 17 Sep 2022 04:03:12 -0600 Subject: [PATCH] Add litter level sensor for Litter-Robot 4 (#78602) Co-authored-by: J. Nick Koston --- homeassistant/components/litterrobot/sensor.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/litterrobot/sensor.py b/homeassistant/components/litterrobot/sensor.py index c904335d23f..1a8f066f54b 100644 --- a/homeassistant/components/litterrobot/sensor.py +++ b/homeassistant/components/litterrobot/sensor.py @@ -100,12 +100,18 @@ ROBOT_SENSOR_MAP: dict[type[Robot], list[RobotSensorEntityDescription]] = { ), ], LitterRobot4: [ + RobotSensorEntityDescription[LitterRobot4]( + key="litter_level", + name="Litter level", + native_unit_of_measurement=PERCENTAGE, + icon_fn=lambda state: icon_for_gauge_level(state, 10), + ), RobotSensorEntityDescription[LitterRobot4]( key="pet_weight", name="Pet weight", icon="mdi:scale", native_unit_of_measurement=MASS_POUNDS, - ) + ), ], FeederRobot: [ RobotSensorEntityDescription[FeederRobot](