From b4c3a23d0065948218e56fdeee2a35bf869de1cd Mon Sep 17 00:00:00 2001 From: magnuselden Date: Sun, 15 Oct 2023 09:32:25 +0200 Subject: [PATCH] misc --- custom_components/peaqhvac/manifest.json | 2 +- custom_components/peaqhvac/service/hvac/offset/offset_utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/peaqhvac/manifest.json b/custom_components/peaqhvac/manifest.json index e6cb9f8e..9048a01e 100644 --- a/custom_components/peaqhvac/manifest.json +++ b/custom_components/peaqhvac/manifest.json @@ -20,7 +20,7 @@ "iot_class": "calculated", "issue_tracker": "https://github.com/elden1337/hass-peaqhvac/issues", "requirements": [ - "peaqevcore==19.5.3" + "peaqevcore==19.5.4" ], "version": "2.0.1" } diff --git a/custom_components/peaqhvac/service/hvac/offset/offset_utils.py b/custom_components/peaqhvac/service/hvac/offset/offset_utils.py index 4615c64b..6f258b2a 100644 --- a/custom_components/peaqhvac/service/hvac/offset/offset_utils.py +++ b/custom_components/peaqhvac/service/hvac/offset/offset_utils.py @@ -15,7 +15,7 @@ def offset_per_day( ret = {} _max_today = max(day_values.values(), default=0) _min_today = min(day_values.values(), default=0) - if tolerance is not None and _max_today != 0 and _max_today != _min_today: + if tolerance is not None and _max_today != _min_today: try: factor = max(abs(_max_today), abs(_min_today)) / tolerance except ZeroDivisionError: