diff --git a/README.md b/README.md index 3a135bf..7c1cb85 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 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). ### Controls and sensors diff --git a/custom_components/dantherm/const.py b/custom_components/dantherm/const.py index 323d35f..d1a3fb6 100644 --- a/custom_components/dantherm/const.py +++ b/custom_components/dantherm/const.py @@ -43,7 +43,8 @@ 10: "HCV400 E1", 11: "HCV400 P1", 12: "HCC 2 E1", - 26: "RCV320", + 21: "RCV320 P2", + 26: "RCV320 P1", } diff --git a/custom_components/dantherm/device.py b/custom_components/dantherm/device.py index 784eaa7..57a7dc6 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": { @@ -118,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, @@ -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})"