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,