diff --git a/README.md b/README.md index d4df499..aea5fa5 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Wiser Home Assistant Integration v3.4.11 +# Wiser Home Assistant Integration v3.4.12 [![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) @@ -29,6 +29,15 @@ For more information checkout the AMAZING community thread available on ## Change log +- v3.4.12 + - Fixed issue assigning schedules with non ascii characters in name - issue #509 + - Fixed error when using HotWater climate automation - issue #517 + - Fixed wiser http path not registering - issue #521 + - Fixed issue causing integration to fail loading with BoilerInterface - issue #523 + - Added support for ButtonPanel (Wiser Odace) - issue #524 + - Bump api to v1.5.19 to resolve issues #509, #523, #524 + + - v3.4.11 - Bump api to v1.5.18 to reduce Payload not completed errors - Fix typo in dimable light color mode - issue #518 diff --git a/custom_components/wiser/const.py b/custom_components/wiser/const.py index 769221f..8a62f04 100755 --- a/custom_components/wiser/const.py +++ b/custom_components/wiser/const.py @@ -6,7 +6,7 @@ """ -VERSION = "3.4.11" +VERSION = "3.4.12" DOMAIN = "wiser" DATA_WISER_CONFIG = "wiser_config" URL_BASE = "/wiser" diff --git a/custom_components/wiser/events.py b/custom_components/wiser/events.py index 979094e..7d9df8c 100644 --- a/custom_components/wiser/events.py +++ b/custom_components/wiser/events.py @@ -66,7 +66,11 @@ def fire_events(hass: HomeAssistant, entity_id: str, old_state: dict, new_state: dict): for event in WISER_EVENTS: - if hasattr(old_state, event[CONF_ATTRIBUTE]): + if ( + hasattr(old_state, event[CONF_ATTRIBUTE]) + and getattr(new_state, event[CONF_ATTRIBUTE]) + and getattr(old_state, event[CONF_ATTRIBUTE]) + ): if ( ( event[CONF_VALUE] == VALUE_DIFF diff --git a/custom_components/wiser/frontend/__init__.py b/custom_components/wiser/frontend/__init__.py index 380135c..2eaa46a 100644 --- a/custom_components/wiser/frontend/__init__.py +++ b/custom_components/wiser/frontend/__init__.py @@ -2,7 +2,9 @@ import logging import os +import pathlib +from homeassistant.core import HomeAssistant from homeassistant.helpers.event import async_call_later from homeassistant.components.http import StaticPathConfig @@ -12,7 +14,7 @@ class WiserCardRegistration: - def __init__(self, hass): + def __init__(self, hass: HomeAssistant): self.hass = hass async def async_register(self): @@ -25,7 +27,10 @@ async def async_register_wiser_path(self): """Register custom cards path if not already registered.""" try: await self.hass.http.async_register_static_paths( - [StaticPathConfig(URL_BASE, "custom_components/wiser/frontend", False)] + [StaticPathConfig(URL_BASE, pathlib.Path(__file__).parent, False)] + ) + _LOGGER.debug( + "Registered wiser path from %s", pathlib.Path(__file__).parent ) except RuntimeError: # Runtime error is likley this is already registered. diff --git a/custom_components/wiser/helpers.py b/custom_components/wiser/helpers.py index bbe4156..5fe2984 100644 --- a/custom_components/wiser/helpers.py +++ b/custom_components/wiser/helpers.py @@ -76,7 +76,7 @@ def get_device_name(data, device_id, device_type="device"): if device.product_type == "PowerTagE": return f"{ENTITY_PREFIX} {device.name}" - if device.product_type == "SmokeAlarmDevice": + if device.product_type in ["SmokeAlarmDevice", "ButtonPanel"]: device_room = data.wiserhub.rooms.get_by_id(device.room_id) if device_room: return f"{ENTITY_PREFIX} {device_room.name} {device.name}" diff --git a/custom_components/wiser/manifest.json b/custom_components/wiser/manifest.json index c25f291..2a55bf3 100755 --- a/custom_components/wiser/manifest.json +++ b/custom_components/wiser/manifest.json @@ -16,9 +16,9 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/asantaga/wiserHomeAssistantPlatform/issues", "requirements": [ - "aioWiserHeatAPI==1.5.18" + "aioWiserHeatAPI==1.5.19" ], - "version": "3.4.10", + "version": "3.4.12", "zeroconf": [ { "type": "_http._tcp.local.",