mirror of
https://github.com/home-assistant/core.git
synced 2026-09-24 07:25:52 -05:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user