Add Cleaning area sensors to Roborock (#94200)

add clean area sensor
This commit is contained in:
Luke
2023-06-10 20:31:34 -04:00
committed by GitHub
parent 3b08d5f0c3
commit eab024992e
3 changed files with 27 additions and 2 deletions
+5 -1
View File
@@ -14,7 +14,7 @@ from tests.common import MockConfigEntry
async def test_sensors(hass: HomeAssistant, setup_entry: MockConfigEntry) -> None:
"""Test sensors and check test values are correctly set."""
assert len(hass.states.async_all("sensor")) == 7
assert len(hass.states.async_all("sensor")) == 9
assert hass.states.get("sensor.roborock_s7_maxv_main_brush_time_left").state == str(
MAIN_BRUSH_REPLACE_TIME - 74382
)
@@ -32,3 +32,7 @@ async def test_sensors(hass: HomeAssistant, setup_entry: MockConfigEntry) -> Non
hass.states.get("sensor.roborock_s7_maxv_total_cleaning_time").state == "74382"
)
assert hass.states.get("sensor.roborock_s7_maxv_status").state == "charging"
assert (
hass.states.get("sensor.roborock_s7_maxv_total_cleaning_area").state == "1159.2"
)
assert hass.states.get("sensor.roborock_s7_maxv_cleaning_area").state == "21.0"