diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ec194a..8d6f6ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change log +## 0.1.14 +- Check for shutoff valve before getting status +- WiFi signal hack + ## 0.1.13 - Hard code thermostat set point limits. Fixed running and running_state for thermostats. diff --git a/src/pyeconet/api.py b/src/pyeconet/api.py index 445444c..e95fc0e 100644 --- a/src/pyeconet/api.py +++ b/src/pyeconet/api.py @@ -229,6 +229,12 @@ def _on_message(self, client, userdata, msg): _equipment = self._equipment.get(key) if _equipment is not None: _equipment.update_equipment_info(unpacked_json) + # Nasty hack to push signal updates to the device it belongs to + elif "@SIGNAL" in str(unpacked_json): + for _equipment in self._equipment.values(): + if _equipment.device_id == _name: + # Don't break after update for multi zone HVAC systems + _equipment.update_equipment_info(unpacked_json) else: _LOGGER.debug("Received update for non-existent equipment with device name: %s and serial number %s", _name, _serial) diff --git a/src/pyeconet/equipment/thermostat.py b/src/pyeconet/equipment/thermostat.py index 4e6581c..71bc41d 100644 --- a/src/pyeconet/equipment/thermostat.py +++ b/src/pyeconet/equipment/thermostat.py @@ -187,7 +187,7 @@ def set_point_limits(self) -> Tuple: """ Returns a tuple of the lower limit and upper limit for the set point. - Thermostat set points are too extream -100 - 200 setting reasonable limits. + Thermostat set points are too extreme -100 - 200 setting reasonable limits. """ return 40, 95 diff --git a/src/pyeconet/equipment/water_heater.py b/src/pyeconet/equipment/water_heater.py index d760354..0aca1d7 100644 --- a/src/pyeconet/equipment/water_heater.py +++ b/src/pyeconet/equipment/water_heater.py @@ -115,9 +115,11 @@ def tank_hot_water_availability(self) -> Union[int, None]: return value @property - def shutoff_valve_open(self) -> bool: + def shutoff_valve_open(self) -> Union[bool, None]: """Return if the shutoff valve is open or not""" - return self._equipment_info.get("@VALVE")["value"] == 0 + if self.has_shutoff_valve: + return self._equipment_info.get("@VALVE")["value"] == 0 + return None @property def tank_health(self) -> Union[int, None]: diff --git a/src/setup.py b/src/setup.py index dd58948..c34fb76 100644 --- a/src/setup.py +++ b/src/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup(name='pyeconet', - version='0.1.13', + version='0.1.14', description='Interface to the unofficial EcoNet API', url='http://github.com/w1ll1am23/pyeconet', author='William Scanlon',