Add new sensors to Roborock (#99983)

* Add 3 new sensor types

* add state options for dock error

* add unit of measurement
This commit is contained in:
Luke Lashley
2023-09-10 00:40:28 +02:00
committed by GitHub
parent 092580a3ed
commit 602e36aa12
3 changed files with 54 additions and 2 deletions
+2 -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")) == 11
assert len(hass.states.async_all("sensor")) == 12
assert hass.states.get("sensor.roborock_s7_maxv_main_brush_time_left").state == str(
MAIN_BRUSH_REPLACE_TIME - 74382
)
@@ -38,3 +38,4 @@ async def test_sensors(hass: HomeAssistant, setup_entry: MockConfigEntry) -> Non
assert hass.states.get("sensor.roborock_s7_maxv_cleaning_area").state == "21.0"
assert hass.states.get("sensor.roborock_s7_maxv_vacuum_error").state == "none"
assert hass.states.get("sensor.roborock_s7_maxv_battery").state == "100"
assert hass.states.get("sensor.roborock_s7_maxv_dock_error").state == "ok"