From 6adda29dcb60c3593c63ebe31bc0d96803188ebb Mon Sep 17 00:00:00 2001 From: SukramJ Date: Wed, 1 Dec 2021 17:26:54 +0100 Subject: [PATCH] 0.0.15 (#63) * Fix remove wildcard for HmIP-STHD * Add unit to hub entities --- changelog.txt | 4 ++++ hahomematic/devices/climate.py | 2 +- hahomematic/hub.py | 9 +++++++++ setup.py | 2 +- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 25cfde3a..b78318b1 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +Version 0.0.15 (2021-12-01) +- Fix: remove wildcard for HmIP-STHD +- Add unit to hub entities + Version 0.0.14 (2021-11-30) - Add KeyMatic - Add HmIP-MOD-OC8 diff --git a/hahomematic/devices/climate.py b/hahomematic/devices/climate.py index f8964907..bbd85a8d 100644 --- a/hahomematic/devices/climate.py +++ b/hahomematic/devices/climate.py @@ -483,7 +483,7 @@ def make_ip_thermostat(device, address, group_base_channels: [int]): "HmIP-BWTH*": (make_ip_thermostat, []), "HmIP-eTRV*": (make_ip_thermostat, []), "HmIP-HEATING": (make_ip_thermostat, []), - "HmIP-STH*": (make_ip_thermostat, []), + "HmIP-STHD": (make_ip_thermostat, []), "HmIP-WTH*": (make_ip_thermostat, []), "HmIPW-STH*": (make_ip_thermostat, []), "HmIPW-WTH*": (make_ip_thermostat, []), diff --git a/hahomematic/hub.py b/hahomematic/hub.py index 8d3755c5..fb59a9a9 100644 --- a/hahomematic/hub.py +++ b/hahomematic/hub.py @@ -53,6 +53,15 @@ def state(self): """Return the state of the entity.""" return self._state + @property + def unit(self): + """Return the unit of the entity.""" + if isinstance(self._state, (bool, str)): + return None + if isinstance(self._state, (int, float)): + return '#' + return None + # pylint: disable=no-self-use async def load_data(self): """Do not load data for the hub here.""" diff --git a/setup.py b/setup.py index b468c855..f4fd4885 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ def readme(): PACKAGE_NAME = "hahomematic" HERE = os.path.abspath(os.path.dirname(__file__)) -VERSION = "0.0.14" +VERSION = "0.0.15" PACKAGES = find_packages(exclude=["tests", "tests.*", "dist", "build"])