Add last clean sensors to Roborock (#100661)
* Add water shortage binary sensor * add last clean sensors * fix tests * fix tests again * remove accidentally added binary sensor
This commit is contained in:
parent
6e0ab35f85
commit
e2bfa9f9cd
3 changed files with 31 additions and 1 deletions
|
@ -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")) == 24
|
||||
assert len(hass.states.async_all("sensor")) == 28
|
||||
assert hass.states.get("sensor.roborock_s7_maxv_main_brush_time_left").state == str(
|
||||
MAIN_BRUSH_REPLACE_TIME - 74382
|
||||
)
|
||||
|
@ -39,3 +39,11 @@ async def test_sensors(hass: HomeAssistant, setup_entry: MockConfigEntry) -> Non
|
|||
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"
|
||||
assert (
|
||||
hass.states.get("sensor.roborock_s7_maxv_last_clean_begin").state
|
||||
== "2023-01-01T03:22:10+00:00"
|
||||
)
|
||||
assert (
|
||||
hass.states.get("sensor.roborock_s7_maxv_last_clean_end").state
|
||||
== "2023-01-01T03:43:58+00:00"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue