From e8bbb31fc752ee1561298bd8ae8b6445e75ebf1f Mon Sep 17 00:00:00 2001 From: Tvalley71 <83084467+Tvalley71@users.noreply.github.com> Date: Tue, 2 Jul 2024 04:44:28 +0200 Subject: [PATCH 1/6] Unit type 26 changed to 'RCV320 P1' --- custom_components/dantherm/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/dantherm/const.py b/custom_components/dantherm/const.py index 323d35f..aa73795 100644 --- a/custom_components/dantherm/const.py +++ b/custom_components/dantherm/const.py @@ -43,7 +43,7 @@ 10: "HCV400 E1", 11: "HCV400 P1", 12: "HCC 2 E1", - 26: "RCV320", + 26: "RCV320 P1", } From 23c49ff2e78afb8874e30cb836dc605e2bd8eb15 Mon Sep 17 00:00:00 2001 From: Tvalley71 <83084467+Tvalley71@users.noreply.github.com> Date: Tue, 2 Jul 2024 04:46:00 +0200 Subject: [PATCH 2/6] Unit type 21 set to 'RCV320 P2' --- custom_components/dantherm/const.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/dantherm/const.py b/custom_components/dantherm/const.py index aa73795..d1a3fb6 100644 --- a/custom_components/dantherm/const.py +++ b/custom_components/dantherm/const.py @@ -43,6 +43,7 @@ 10: "HCV400 E1", 11: "HCV400 P1", 12: "HCC 2 E1", + 21: "RCV320 P2", 26: "RCV320 P1", } From 4a73ad63fe4befd72b928354d970f0840dcfaa68 Mon Sep 17 00:00:00 2001 From: Tvalley71 <83084467+Tvalley71@users.noreply.github.com> Date: Tue, 2 Jul 2024 08:20:53 +0200 Subject: [PATCH 3/6] Fix for multiple integration instances --- custom_components/dantherm/device.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/custom_components/dantherm/device.py b/custom_components/dantherm/device.py index 784eaa7..b9a3eb9 100644 --- a/custom_components/dantherm/device.py +++ b/custom_components/dantherm/device.py @@ -52,7 +52,6 @@ async def async_will_remove_from_hass(self) -> None: def suspend_refresh(self, seconds: int): """Suspend entity refresh for specified number of seconds.""" - self.attr_suspend_refresh = datetime.now() + timedelta(seconds=seconds) @property @@ -63,7 +62,7 @@ def key(self) -> str: @property def unique_id(self) -> str | None: """Return the unique id.""" - return f"dantherm_{self.key}" + return f"{self._device.get_device_name}_{self.key}" @property def translation_key(self) -> str: @@ -81,7 +80,7 @@ def available(self) -> bool: @property def device_info(self): """Device Info.""" - unique_id = self._device.get_device_name + " " + self._device.get_device_type + unique_id = self._device.get_device_name return { "identifiers": { @@ -568,6 +567,7 @@ async def write_holding_registers( @property def get_device_name(self) -> str: """Device name.""" + return self._device_name @property @@ -582,6 +582,7 @@ def get_device_type(self) -> str: @property def get_device_fw_version(self) -> str: """Device firmware version.""" + minor = (self._device_fw_version >> 8) & 0xFF major = self._device_fw_version & 0xFF return f"({major}.{minor:02})" From 8076712106023841140a18c764d8fc1dd0c4fad6 Mon Sep 17 00:00:00 2001 From: Tvalley71 <83084467+Tvalley71@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:37:28 +0200 Subject: [PATCH 4/6] Update device.py --- custom_components/dantherm/device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/dantherm/device.py b/custom_components/dantherm/device.py index b9a3eb9..57a7dc6 100644 --- a/custom_components/dantherm/device.py +++ b/custom_components/dantherm/device.py @@ -117,7 +117,7 @@ def __init__( self._port = port self._unit_id = int(unit_id) self._client_config = { - "name": self._device_name, + "name": name, "type": "tcp", "method": "rtu", "delay": 0, From 4f309427d1e67044d6f739aca2354b349a16dd25 Mon Sep 17 00:00:00 2001 From: Tvalley71 <83084467+Tvalley71@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:47:45 +0200 Subject: [PATCH 5/6] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3a135bf..97a8a65 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,12 @@ Known supported units: - HCV300 ALU - HCV400 P2 -- RCV320 +- RCV320 P1/P2 > [!NOTE] -> The listed units are known to have been tested with the integration. There may be other Dantherm units that are also supported. If you know of any not included in the list, please feel free to contact me [here](https://github.com/Tvalley71/dantherm/discussions/new?category=general). +> The listed units are known to have been tested with the integration. Basicly all unit that use the _Dantherm Residential_ app +> ([Google Play](https://play.google.com/store/apps/details?id=com.dantherm.ventilation) or [Apple Store](https://apps.apple.com/dk/app/dantherm-residential/id1368468353)). +> If you know of any not included in the list, please feel free to contact me [here](https://github.com/Tvalley71/dantherm/discussions/new?category=general). ### Controls and sensors From fc4bbec40431a82bb9cf5b69ad1a2a99fb7812c7 Mon Sep 17 00:00:00 2001 From: Tvalley71 <83084467+Tvalley71@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:51:25 +0200 Subject: [PATCH 6/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 97a8a65..7c1cb85 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Known supported units: - RCV320 P1/P2 > [!NOTE] -> The listed units are known to have been tested with the integration. Basicly all unit that use the _Dantherm Residential_ app +> The listed units are known to have been tested with the integration. Basicly all unit that use the _Dantherm Residential_ app ought to work with the integration. > ([Google Play](https://play.google.com/store/apps/details?id=com.dantherm.ventilation) or [Apple Store](https://apps.apple.com/dk/app/dantherm-residential/id1368468353)). > If you know of any not included in the list, please feel free to contact me [here](https://github.com/Tvalley71/dantherm/discussions/new?category=general).