mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Increase polling interval to prevent reaching daily limit (#53066)
* increase polling interval to prevent reaching daily limit * update test accordingly
This commit is contained in:
parent
989839a1a9
commit
cf647c5d20
@ -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…
x
Reference in New Issue
Block a user