2021-02-17 05:37:56 +00:00
|
|
|
"""Tests for the smarttub integration."""
|
2021-02-20 22:25:02 +00:00
|
|
|
|
|
|
|
from datetime import timedelta
|
|
|
|
|
|
|
|
from homeassistant.components.smarttub.const import SCAN_INTERVAL
|
2023-05-29 21:09:42 +00:00
|
|
|
from homeassistant.util import dt as dt_util
|
2021-02-20 22:25:02 +00:00
|
|
|
|
|
|
|
from tests.common import async_fire_time_changed
|
|
|
|
|
|
|
|
|
|
|
|
async def trigger_update(hass):
|
|
|
|
"""Trigger a polling update by moving time forward."""
|
2023-05-29 21:09:42 +00:00
|
|
|
new_time = dt_util.utcnow() + timedelta(seconds=SCAN_INTERVAL + 1)
|
2021-02-20 22:25:02 +00:00
|
|
|
async_fire_time_changed(hass, new_time)
|
|
|
|
await hass.async_block_till_done()
|