mirror of
https://github.com/home-assistant/core.git
synced 2025-08-01 11:45:09 +02:00
Fix test with time issue for xiaomi_miio button (#95438)
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user