Increase polling interval to prevent reaching daily limit (#53066)
* increase polling interval to prevent reaching daily limit * update test accordinglypull/53080/head
parent
989839a1a9
commit
cf647c5d20
homeassistant/components/home_plus_control
tests/components/home_plus_control
|
@ -133,7 +133,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
name="home_plus_control_module",
|
||||
update_method=async_update_data,
|
||||
# Polling interval. Will only be polled if there are subscribers.
|
||||
update_interval=timedelta(seconds=60),
|
||||
update_interval=timedelta(seconds=300),
|
||||
)
|
||||
hass_entry_data[DATA_COORDINATOR] = coordinator
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ async def test_plant_topology_reduction_change(
|
|||
return_value=mock_modules,
|
||||
) as mock_check:
|
||||
async_fire_time_changed(
|
||||
hass, dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=100)
|
||||
hass, dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=400)
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
assert len(mock_check.mock_calls) == 1
|
||||
|
@ -208,7 +208,7 @@ async def test_plant_topology_increase_change(
|
|||
return_value=mock_modules,
|
||||
) as mock_check:
|
||||
async_fire_time_changed(
|
||||
hass, dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=100)
|
||||
hass, dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=400)
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
assert len(mock_check.mock_calls) == 1
|
||||
|
@ -268,7 +268,7 @@ async def test_module_status_unavailable(hass, mock_config_entry, mock_modules):
|
|||
return_value=mock_modules,
|
||||
) as mock_check:
|
||||
async_fire_time_changed(
|
||||
hass, dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=100)
|
||||
hass, dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=400)
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
assert len(mock_check.mock_calls) == 1
|
||||
|
@ -339,7 +339,7 @@ async def test_module_status_available(
|
|||
return_value=mock_modules,
|
||||
) as mock_check:
|
||||
async_fire_time_changed(
|
||||
hass, dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=100)
|
||||
hass, dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=400)
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
assert len(mock_check.mock_calls) == 1
|
||||
|
@ -443,7 +443,7 @@ async def test_update_with_api_error(
|
|||
side_effect=HomePlusControlApiError,
|
||||
) as mock_check:
|
||||
async_fire_time_changed(
|
||||
hass, dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=100)
|
||||
hass, dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=400)
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
assert len(mock_check.mock_calls) == 1
|
||||
|
|
Loading…
Reference in New Issue