From 4858970bf82fe4de265e637db3c8fb843665903d Mon Sep 17 00:00:00 2001 From: "Ian C." <108159253+ic-dev21@users.noreply.github.com> Date: Fri, 4 Oct 2024 18:25:03 -0400 Subject: [PATCH 1/2] Quick fix Issue 466 Quick fix pour dvd-dev/hilo#466 --- LICENSE | 2 +- pyhilo/device/climate.py | 4 ++-- pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LICENSE b/LICENSE index 32b66c2..84f7c28 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020-2023 David Vallee Delisle +Copyright (c) 2020-2024 David Vallee Delisle Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pyhilo/device/climate.py b/pyhilo/device/climate.py index af3ceaa..4a999e1 100644 --- a/pyhilo/device/climate.py +++ b/pyhilo/device/climate.py @@ -22,11 +22,11 @@ def target_temperature(self) -> float: @property def max_temp(self) -> float: - return cast(float, self.get_value("max_temp_setpoint", 0)) + return cast(float, self.get_value("max_temp_setpoint", 30)) @property def min_temp(self) -> float: - return cast(float, self.get_value("min_temp_setpoint", 0)) + return cast(float, self.get_value("min_temp_setpoint", 5)) @property def hvac_action(self) -> str: diff --git a/pyproject.toml b/pyproject.toml index e765fb9..d4e6337 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ exclude = ".venv/.*" [tool.poetry] name = "python-hilo" -version = "2024.6.1" +version = "2024.10.1" description = "A Python3, async interface to the Hilo API" readme = "README.md" authors = ["David Vallee Delisle "] From 23e6e38b87b03b414324a1ef3178ca0c60460113 Mon Sep 17 00:00:00 2001 From: "Ian C." <108159253+ic-dev21@users.noreply.github.com> Date: Fri, 4 Oct 2024 18:46:40 -0400 Subject: [PATCH 2/2] Update climate.py Tweak --- pyhilo/device/climate.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pyhilo/device/climate.py b/pyhilo/device/climate.py index 4a999e1..6261c2d 100644 --- a/pyhilo/device/climate.py +++ b/pyhilo/device/climate.py @@ -22,11 +22,19 @@ def target_temperature(self) -> float: @property def max_temp(self) -> float: - return cast(float, self.get_value("max_temp_setpoint", 30)) + value = self.get_value("max_temp_setpoint", 30) + + if value is None or value == 0: + return 36.0 + return float(value) @property def min_temp(self) -> float: - return cast(float, self.get_value("min_temp_setpoint", 5)) + value = self.get_value("min_temp_setpoint", 5) + + if value is None or value == 0: + return 5.0 + return float(value) @property def hvac_action(self) -> str: