From e233fe867c8c660affd8c89a665b2ac0ffdaf3b4 Mon Sep 17 00:00:00 2001 From: "Ian C." <108159253+ic-dev21@users.noreply.github.com> Date: Thu, 27 Jun 2024 19:03:53 -0400 Subject: [PATCH] Fix pour issue #442 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Causé par un upstream PR dans le codebase de HA. Voir home-assistant/core##110685 --- custom_components/hilo/const.py | 1 + custom_components/hilo/manifest.json | 2 +- custom_components/hilo/sensor.py | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/hilo/const.py b/custom_components/hilo/const.py index 7f3518a..6a86e7e 100755 --- a/custom_components/hilo/const.py +++ b/custom_components/hilo/const.py @@ -42,6 +42,7 @@ # Note ic-dev21: we'll stay at 300 until proper fix EVENT_SCAN_INTERVAL_REDUCTION = 300 NOTIFICATION_SCAN_INTERVAL = 1800 +MAX_SUB_INTERVAL = 120 MIN_SCAN_INTERVAL = 60 REWARD_SCAN_INTERVAL = 7200 diff --git a/custom_components/hilo/manifest.json b/custom_components/hilo/manifest.json index 5c1d72c..3005cba 100755 --- a/custom_components/hilo/manifest.json +++ b/custom_components/hilo/manifest.json @@ -12,5 +12,5 @@ "iot_class": "cloud_push", "issue_tracker": "https://github.com/dvd-dev/hilo/issues", "requirements": ["python-hilo>=2024.6.1"], - "version": "2024.6.2" + "version": "2024.7.1" } diff --git a/custom_components/hilo/sensor.py b/custom_components/hilo/sensor.py index c9fc4d9..2a71e98 100755 --- a/custom_components/hilo/sensor.py +++ b/custom_components/hilo/sensor.py @@ -55,6 +55,7 @@ HILO_ENERGY_TOTAL, HILO_SENSOR_CLASSES, LOG, + MAX_SUB_INTERVAL, NOTIFICATION_SCAN_INTERVAL, REWARD_SCAN_INTERVAL, TARIFF_LIST, @@ -294,6 +295,7 @@ def __init__(self, hilo, device): super().__init__( integration_method=METHOD_LEFT, + max_sub_interval=timedelta(seconds=MAX_SUB_INTERVAL), name=self._attr_name, round_digits=2, source_entity=self._source,