Fix test with time issue for xiaomi_miio button (#95438)
This commit is contained in:
parent
fe7857c8ec
commit
8b6ed9c6b9
1 changed files with 2 additions and 1 deletions
|
@ -52,6 +52,7 @@ async def test_vacuum_button_params(hass: HomeAssistant) -> None:
|
|||
assert state.state == "unknown"
|
||||
|
||||
|
||||
@pytest.mark.freeze_time("2023-06-28 00:00:00+00:00")
|
||||
async def test_vacuum_button_press(hass: HomeAssistant) -> None:
|
||||
"""Test pressing a vacuum button."""
|
||||
|
||||
|
@ -71,7 +72,7 @@ async def test_vacuum_button_press(hass: HomeAssistant) -> None:
|
|||
|
||||
state = hass.states.get(f"{entity_id}_reset_side_brush")
|
||||
assert state
|
||||
assert state.state[0:21] == pressed_at.isoformat()[0:21] # drop millisecs
|
||||
assert state.state == pressed_at.isoformat()
|
||||
|
||||
|
||||
async def setup_component(hass: HomeAssistant, entity_name: str) -> str:
|
||||
|
|
Loading…
Add table
Reference in a new issue