diff --git a/homeassistant/components/roborock/binary_sensor.py b/homeassistant/components/roborock/binary_sensor.py index 687d3a1f72532d..b9a59e50333292 100644 --- a/homeassistant/components/roborock/binary_sensor.py +++ b/homeassistant/components/roborock/binary_sensor.py @@ -5,7 +5,7 @@ from collections.abc import Callable from dataclasses import dataclass -from roborock.data import RoborockStateCode +from roborock.data import CleanFluidStatus, RoborockStateCode from homeassistant.components.binary_sensor import ( BinarySensorDeviceClass, @@ -64,6 +64,18 @@ class RoborockBinarySensorDescription(BinarySensorEntityDescription): entity_category=EntityCategory.DIAGNOSTIC, value_fn=lambda data: data.status.water_shortage_status, ), + RoborockBinarySensorDescription( + key="clean_fluid_empty", + translation_key="clean_fluid_empty", + device_class=BinarySensorDeviceClass.PROBLEM, + entity_category=EntityCategory.DIAGNOSTIC, + value_fn=lambda data: ( + data.status.clean_fluid_status == CleanFluidStatus.empty_not_installed + if data.status.clean_fluid_status is not None + else None + ), + is_dock_entity=True, + ), RoborockBinarySensorDescription( key="in_cleaning", translation_key="in_cleaning", diff --git a/homeassistant/components/roborock/icons.json b/homeassistant/components/roborock/icons.json index b077362cac414e..f6053090bb7a97 100644 --- a/homeassistant/components/roborock/icons.json +++ b/homeassistant/components/roborock/icons.json @@ -1,6 +1,9 @@ { "entity": { "binary_sensor": { + "clean_fluid_empty": { + "default": "mdi:spray-bottle" + }, "in_cleaning": { "default": "mdi:vacuum" }, diff --git a/homeassistant/components/roborock/strings.json b/homeassistant/components/roborock/strings.json index 028e41ca76aa36..b27f7175942c63 100644 --- a/homeassistant/components/roborock/strings.json +++ b/homeassistant/components/roborock/strings.json @@ -41,6 +41,9 @@ }, "entity": { "binary_sensor": { + "clean_fluid_empty": { + "name": "Cleaning fluid" + }, "in_cleaning": { "name": "Cleaning" }, diff --git a/tests/components/roborock/mock_data.py b/tests/components/roborock/mock_data.py index 80a51dff45d6a1..1c02aba12810fb 100644 --- a/tests/components/roborock/mock_data.py +++ b/tests/components/roborock/mock_data.py @@ -1389,6 +1389,7 @@ "home_sec_enable_password": 0, "adbumper_status": [0, 0, 0], "water_shortage_status": 0, + "clean_fluid_status": 0, "dock_type": 3, "dust_collection_status": 0, "auto_dust_collection": 1,