From 6960cccc6438166b5aa200cafd3bbaea496f3165 Mon Sep 17 00:00:00 2001 From: Mark Parker Date: Tue, 5 Mar 2024 10:59:51 +0000 Subject: [PATCH 1/8] no session param on wiserAPI - Error doing job: Task exception was never retrieved #446 --- custom_components/wiser/config_flow.py | 1 - 1 file changed, 1 deletion(-) diff --git a/custom_components/wiser/config_flow.py b/custom_components/wiser/config_flow.py index 68bafe5..a105460 100755 --- a/custom_components/wiser/config_flow.py +++ b/custom_components/wiser/config_flow.py @@ -69,7 +69,6 @@ async def validate_input(hass: HomeAssistant, data): host=data[CONF_HOST], port=data[CONF_PORT], secret=data[CONF_PASSWORD], - session=async_get_clientsession(hass), extra_config_file=hass.config.config_dir + CUSTOM_DATA_STORE, enable_automations=False, ) From 764941420608a4930293a4fec3a4742f068a0e40 Mon Sep 17 00:00:00 2001 From: Mark Parker Date: Tue, 5 Mar 2024 11:00:30 +0000 Subject: [PATCH 2/8] handle power sensors not available Powertag-E no attribute "get" (new on 3.4.4) #449 --- custom_components/wiser/sensor.py | 41 ++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/custom_components/wiser/sensor.py b/custom_components/wiser/sensor.py index cfdc3cb..76e1223 100755 --- a/custom_components/wiser/sensor.py +++ b/custom_components/wiser/sensor.py @@ -1193,25 +1193,36 @@ def _handle_coordinator_update(self) -> None: """Fetch new state data for the sensor.""" super()._handle_coordinator_update() if self._lts_sensor_type == "Power": - self._state = self._data.wiserhub.devices.get_by_id(self._device_id).get( - "instantaneous_power", 0 - ) + if self._data.wiserhub.devices.get_by_id( + self._device_id + ).instantaneous_power: + self._state = self._data.wiserhub.devices.get_by_id( + self._device_id + ).instantaneous_power + else: + self._state = 0 elif self._lts_sensor_type == "Energy": - self._state = round( - self._data.wiserhub.devices.get_by_id(self._device_id).get( - "delivered_power", 0 + if self._data.wiserhub.devices.get_by_id(self._device_id).delivered_power: + self._state = round( + self._data.wiserhub.devices.get_by_id( + self._device_id + ).delivered_power + / 1000, + 2, ) - / 1000, - 2, - ) + else: + self._state = 0 elif self._lts_sensor_type == "EnergyReceived": - self._state = round( - self._data.wiserhub.devices.get_by_id(self._device_id).get( - "received_power", 0 + if self._data.wiserhub.devices.get_by_id(self._device_id).received_power: + self._state = round( + self._data.wiserhub.devices.get_by_id( + self._device_id + ).received_power + / 1000, + 2, ) - / 1000, - 2, - ) + else: + self._state = 0 self.async_write_ha_state() @property From 7582748b4295bbfd9478d40768ff0810c545eab7 Mon Sep 17 00:00:00 2001 From: Mark Parker Date: Tue, 5 Mar 2024 11:04:12 +0000 Subject: [PATCH 3/8] set correct presets icon --- custom_components/wiser/icons.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/wiser/icons.json b/custom_components/wiser/icons.json index 3c5801c..556ea0b 100644 --- a/custom_components/wiser/icons.json +++ b/custom_components/wiser/icons.json @@ -4,7 +4,7 @@ "wiser": { "state_attributes": { "preset_mode": { - "default": "mdi:home-thermometer", + "default": "mdi:tune-variant", "state": { "Advance Schedule": "mdi:calendar-arrow-right", "Cancel Overrides": "mdi:close-circle", From 23f4fac0ec9d3d178784e0b2b8abc59c806a5361 Mon Sep 17 00:00:00 2001 From: Mark Parker Date: Tue, 5 Mar 2024 12:34:52 +0000 Subject: [PATCH 4/8] bump api to v1.5.12 --- custom_components/wiser/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/wiser/manifest.json b/custom_components/wiser/manifest.json index 00acb43..4524419 100755 --- a/custom_components/wiser/manifest.json +++ b/custom_components/wiser/manifest.json @@ -16,7 +16,7 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/asantaga/wiserHomeAssistantPlatform/issues", "requirements": [ - "aioWiserHeatAPI==1.5.11" + "aioWiserHeatAPI==1.5.12" ], "version": "3.4.3", "zeroconf": [ From 65742da9c970694a5a02c55947c954fa914708b1 Mon Sep 17 00:00:00 2001 From: Mark Parker Date: Tue, 5 Mar 2024 13:14:39 +0000 Subject: [PATCH 5/8] differentiate heating channel names in operation sensor --- custom_components/wiser/sensor.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/custom_components/wiser/sensor.py b/custom_components/wiser/sensor.py index 76e1223..974bcbd 100755 --- a/custom_components/wiser/sensor.py +++ b/custom_components/wiser/sensor.py @@ -540,6 +540,18 @@ def _handle_coordinator_update(self) -> None: self._state = self._device.current_state self.async_write_ha_state() + @property + def name(self): + """Return name of sensor.""" + if ( + self._sensor_type == "Heating" + and len(self._data.wiserhub.heating_channels.all) > 1 + ): + return get_device_name( + self._data, 0, self._sensor_type + " Channel " + str(self._device_id) + ) + return get_device_name(self._data, 0, self._sensor_type) + @property def icon(self): """Return icon.""" From 6d6c8ac94a9b47385ece30e37e2b544e8ad8de51 Mon Sep 17 00:00:00 2001 From: Mark Parker Date: Tue, 5 Mar 2024 13:28:32 +0000 Subject: [PATCH 6/8] fix signal sensor showing unknown after restart --- custom_components/wiser/sensor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/wiser/sensor.py b/custom_components/wiser/sensor.py index 974bcbd..84bbbd1 100755 --- a/custom_components/wiser/sensor.py +++ b/custom_components/wiser/sensor.py @@ -332,6 +332,7 @@ def __init__(self, data, device_id=0, sensor_type="") -> None: self._device = self._data.wiserhub.system else: self._device = self._data.wiserhub.devices.get_by_id(self._device_id) + self._state = self._device.signal.displayed_signal_strength @callback def _handle_coordinator_update(self) -> None: From bad9cf8cf863ab0d89f2416cf4a690bd1f9c4a47 Mon Sep 17 00:00:00 2001 From: Mark Parker Date: Tue, 5 Mar 2024 13:42:49 +0000 Subject: [PATCH 7/8] v3.4.5 --- README.md | 10 +++++++++- custom_components/wiser/const.py | 2 +- custom_components/wiser/manifest.json | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6667c67..1da4ad2 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Wiser Home Assistant Integration v3.4.4 +# Wiser Home Assistant Integration v3.4.5 [![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg?style=for-the-badge)](https://github.com/hacs/integration) [![downloads](https://shields.io/github/downloads/asantaga/wiserHomeAssistantPlatform/latest/total?style=for-the-badge)](https://github.com/asantaga/wiserHomeAssistantPlatform) @@ -24,6 +24,14 @@ For more information checkout the AMAZING community thread available on ## Change log +- v3.4.5 + - Bump api to v1.5.12 to improve performance of improve retry handling + - Fixed issue caused by v3.4.4 that heating actuators and power tags error on load (issue [#449](https://github.com/asantaga/wiserHomeAssistantPlatform/issues/449), #450) + - Fixed error setting up integration in config flow caused by session parameter being passed when no longer required + - Fixed issue on 3 channel hubs with Heating sensor names + - Fixed issue with signal sensor showing unknown on startup until first refresh + - Changed preset icon to HA standard + - v3.4.4 - Bump api to v1.5.11 - Improved api retry handling for inconsitant errors coming from the hub causing errors in the log and entities to go unavailable (issues [#434](https://github.com/asantaga/wiserHomeAssistantPlatform/issues/434), #436, #439) diff --git a/custom_components/wiser/const.py b/custom_components/wiser/const.py index f9db67c..9a031d3 100755 --- a/custom_components/wiser/const.py +++ b/custom_components/wiser/const.py @@ -5,7 +5,7 @@ Angelosantagata@gmail.com """ -VERSION = "3.4.4" +VERSION = "3.4.5" DOMAIN = "wiser" DATA_WISER_CONFIG = "wiser_config" URL_BASE = "/wiser" diff --git a/custom_components/wiser/manifest.json b/custom_components/wiser/manifest.json index 4524419..cd96e46 100755 --- a/custom_components/wiser/manifest.json +++ b/custom_components/wiser/manifest.json @@ -18,7 +18,7 @@ "requirements": [ "aioWiserHeatAPI==1.5.12" ], - "version": "3.4.3", + "version": "3.4.5", "zeroconf": [ { "type": "_http._tcp.local.", From ec863f19dd5fc30188bec72b124f480d900342e6 Mon Sep 17 00:00:00 2001 From: Mark Parker Date: Tue, 5 Mar 2024 13:48:49 +0000 Subject: [PATCH 8/8] update readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1da4ad2..979ae9b 100755 --- a/README.md +++ b/README.md @@ -25,9 +25,9 @@ For more information checkout the AMAZING community thread available on ## Change log - v3.4.5 - - Bump api to v1.5.12 to improve performance of improve retry handling - - Fixed issue caused by v3.4.4 that heating actuators and power tags error on load (issue [#449](https://github.com/asantaga/wiserHomeAssistantPlatform/issues/449), #450) - - Fixed error setting up integration in config flow caused by session parameter being passed when no longer required + - Bump api to v1.5.12 to improve performance of improved retry handling + - Fixed issue caused by v3.4.4 that heating actuators and power tags error on load (issue [#449](https://github.com/asantaga/wiserHomeAssistantPlatform/issues/449), [#450](https://github.com/asantaga/wiserHomeAssistantPlatform/issues/450)) + - Fixed error setting up integration in config flow caused by session parameter being passed when no longer required (issue [#446](https://github.com/asantaga/wiserHomeAssistantPlatform/issues/446)) - Fixed issue on 3 channel hubs with Heating sensor names - Fixed issue with signal sensor showing unknown on startup until first refresh - Changed preset icon to HA standard