From eaa24169da2fa17282f40743ce5d67510d3add76 Mon Sep 17 00:00:00 2001 From: snaky69 <108159253+ic-dev21@users.noreply.github.com> Date: Mon, 5 Feb 2024 19:44:13 -0500 Subject: [PATCH] Invalidation lors de l'appreciation et pre_heat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit À la demande de @FrancoLoco afin d'avoir les attributs de défis plus tôt. Merci pour l'idée. Bump up version --- custom_components/hilo/__init__.py | 10 +++++----- custom_components/hilo/manifest.json | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/custom_components/hilo/__init__.py b/custom_components/hilo/__init__.py index df60260..ccfd4cd 100755 --- a/custom_components/hilo/__init__.py +++ b/custom_components/hilo/__init__.py @@ -370,14 +370,14 @@ async def get_event_details(self, event_id: int): del self._events[event_id] """ Note ic-dev21: temp fix until we an make it prettier. - During reduction we delete the event attributes and reload - them with the next if, the rest of time time we're reading - it from cache + During appreciation, pre-heat and reduction we delete + the event attributes and reload them with the next if, + the rest of time time we're reading it from cache """ - if event.state == "reduction": + if event.state in ["appreciation", "pre_heat", "reduction"]: LOG.debug( - f"Invalidating cache for event {event_id} during reduction phase ({event.last_update=})" + f"Invalidating cache for event {event_id} during appreciation, pre_heat or reduction phase ({event.last_update=})" ) del self._events[event_id] diff --git a/custom_components/hilo/manifest.json b/custom_components/hilo/manifest.json index 5305d9a..c8b282a 100755 --- a/custom_components/hilo/manifest.json +++ b/custom_components/hilo/manifest.json @@ -11,6 +11,6 @@ "documentation": "https://github.com/dvd-dev/hilo", "iot_class": "cloud_push", "issue_tracker": "https://github.com/dvd-dev/hilo/issues", - "requirements": ["python-hilo>=2024.1.2"], - "version": "2024.1.3" + "requirements": ["python-hilo>=2024.2.1"], + "version": "2024.2.1" }