File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
tests/components/plugwise Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1414import pytest
1515
1616from freezegun .api import FrozenDateTimeFactory
17- from homeassistant .components .plugwise .const import DOMAIN
17+ from homeassistant .components .plugwise .const import DEFAULT_SCAN_INTERVAL , DOMAIN
1818from homeassistant .components .plugwise .coordinator import PlugwiseDataUpdateCoordinator
1919from homeassistant .config_entries import ConfigEntryState
2020from homeassistant .const import (
@@ -283,6 +283,13 @@ async def test_update_interval(
283283 assert mock_config_entry .state is ConfigEntryState .LOADED
284284 assert mock_smile_adam_heat_cool .async_update .call_count == 1
285285
286+ assert DEFAULT_SCAN_INTERVAL [mock_smile_adam_heat_cool .smile .type ] == timedelta (seconds = 60 )
287+ freezer .tick (DEFAULT_SCAN_INTERVAL [mock_smile_adam_heat_cool .smile .type ])
288+ async_fire_time_changed (hass )
289+ await hass .async_block_till_done ()
290+
291+ assert mock_smile_adam_heat_cool .async_update .call_count == 2
292+
286293
287294@pytest .mark .parametrize ("chosen_env" , ["m_adam_heating" ], indirect = True )
288295@pytest .mark .parametrize ("cooling_present" , [False ], indirect = True )
You can’t perform that action at this time.
0 commit comments