diff --git a/py_agua_iot/__init__.py b/py_agua_iot/__init__.py index c63e70f..e6ec8b4 100644 --- a/py_agua_iot/__init__.py +++ b/py_agua_iot/__init__.py @@ -498,17 +498,23 @@ def __get_information_item(self, item, format_string=False): return None def __get_information_item_min(self, item): - value = int(self.__register_map_dict[item]["set_min"]) - _LOGGER.debug("GET '%s' MIN: %s", item, value) - return value + try: + value = int(self.__register_map_dict[item]["set_min"]) + _LOGGER.debug("GET '%s' MIN: %s", item, value) + return value + except (KeyError, ValueError): + return None def __get_information_item_max(self, item): - value = int(self.__register_map_dict[item]["set_max"]) - _LOGGER.debug("GET '%s' MAX: %s", item, value) - return value + try: + value = int(self.__register_map_dict[item]["set_max"]) + _LOGGER.debug("GET '%s' MAX: %s", item, value) + return value + except (KeyError, ValueError): + return None def __prepare_value_for_writing(self, item, value): - value = float(value) + value = int(value) set_min = self.__register_map_dict[item]["set_min"] set_max = self.__register_map_dict[item]["set_max"] @@ -631,11 +637,11 @@ def alarms_translated(self): ] @property - def min_temp(self): + def min_air_temp(self): return self.__get_information_item_min("temp_air_set") @property - def max_temp(self): + def max_air_temp(self): return self.__get_information_item_max("temp_air_set") @property @@ -662,6 +668,14 @@ def set_air_temperature(self, value): except Error: raise Error("Error while trying to set temperature") + @property + def min_water_temp(self): + return self.__get_information_item_min("temp_water_set") + + @property + def max_water_temp(self): + return self.__get_information_item_max("temp_water_set") + @property def water_temperature(self): return self.__get_information_item("temp_water_get") diff --git a/setup.py b/setup.py index 2946759..64d59cd 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="py-agua-iot", - version="0.0.16", + version="0.0.17", author="Frederic Van Linthoudt", author_email="frederic.van.linthoudt@gmail.com", description="py-agua-iot provides controlling heating devices connected via the IOT Agua platform of Micronova",