From 8e1f80c104405c7adf7b2992256dc87408619d45 Mon Sep 17 00:00:00 2001 From: Gavin Melling Date: Fri, 13 Oct 2023 21:50:57 +0100 Subject: [PATCH] fix: Fixed intelligent coordinator update frequency (thanks @Pixel-Gavin) --- .../octopus_energy/coordinators/intelligent_dispatches.py | 2 +- .../octopus_energy/coordinators/intelligent_settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/octopus_energy/coordinators/intelligent_dispatches.py b/custom_components/octopus_energy/coordinators/intelligent_dispatches.py index 387e2b09..585457ed 100644 --- a/custom_components/octopus_energy/coordinators/intelligent_dispatches.py +++ b/custom_components/octopus_energy/coordinators/intelligent_dispatches.py @@ -80,7 +80,7 @@ async def async_update_intelligent_dispatches_data(): update_method=async_update_intelligent_dispatches_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 ) diff --git a/custom_components/octopus_energy/coordinators/intelligent_settings.py b/custom_components/octopus_energy/coordinators/intelligent_settings.py index 24d777ab..de816ef9 100644 --- a/custom_components/octopus_energy/coordinators/intelligent_settings.py +++ b/custom_components/octopus_energy/coordinators/intelligent_settings.py @@ -71,7 +71,7 @@ async def async_update_intelligent_settings_data(): _LOGGER, name="intelligent_settings", update_method=async_update_intelligent_settings_data, - update_interval=timedelta(minutes=COORDINATOR_REFRESH_IN_SECONDS), + update_interval=timedelta(seconds=COORDINATOR_REFRESH_IN_SECONDS), always_update=True )