Skip to content

Commit

Permalink
fix: Fixed update interval for data coordinators to be minutes not hours
Browse files Browse the repository at this point in the history
  • Loading branch information
BottlecapDave committed Oct 13, 2023
1 parent 8e1f80c commit 830604d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion custom_components/octopus_energy/coordinators/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def async_update_account_data():
update_method=async_update_account_data,
# Because of how we're using the data, we'll update every minute, but we will only actually retrieve
# data every 30 minutes
update_interval=timedelta(minutes=COORDINATOR_REFRESH_IN_SECONDS),
update_interval=timedelta(seconds=COORDINATOR_REFRESH_IN_SECONDS),
always_update=True
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async def async_update_electricity_standing_charges_data():
update_method=async_update_electricity_standing_charges_data,
# Because of how we're using the data, we'll update every minute, but we will only actually retrieve
# data every 30 minutes
update_interval=timedelta(minutes=COORDINATOR_REFRESH_IN_SECONDS),
update_interval=timedelta(seconds=COORDINATOR_REFRESH_IN_SECONDS),
always_update=True
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async def async_update_gas_standing_charges_data():
update_method=async_update_gas_standing_charges_data,
# Because of how we're using the data, we'll update every minute, but we will only actually retrieve
# data every 30 minutes
update_interval=timedelta(minutes=COORDINATOR_REFRESH_IN_SECONDS),
update_interval=timedelta(seconds=COORDINATOR_REFRESH_IN_SECONDS),
always_update=True
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ async def async_update_data():
update_method=async_update_data,
# Because of how we're using the data, we'll update every minute, but we will only actually retrieve
# data every 30 minutes
update_interval=timedelta(minutes=COORDINATOR_REFRESH_IN_SECONDS),
update_interval=timedelta(seconds=COORDINATOR_REFRESH_IN_SECONDS),
always_update=True
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def async_update_saving_sessions():
update_method=async_update_saving_sessions,
# Because of how we're using the data, we'll update every minute, but we will only actually retrieve
# data every 30 minutes
update_interval=timedelta(minutes=COORDINATOR_REFRESH_IN_SECONDS),
update_interval=timedelta(seconds=COORDINATOR_REFRESH_IN_SECONDS),
always_update=True
)

Expand Down

0 comments on commit 830604d

Please sign in to comment.