diff --git a/changelog.txt b/changelog.txt index 9f801cec..f4b65bdb 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +Version 0.1.2 (2021-12-21) +- Rotate device identifier + Version 0.1.1 (2021-12-21) - Remove unnecessary async - Removed unused helper diff --git a/hahomematic/const.py b/hahomematic/const.py index 083b7ec8..96158e02 100644 --- a/hahomematic/const.py +++ b/hahomematic/const.py @@ -15,7 +15,7 @@ IP_ANY_V4 = "0.0.0.0" IP_ANY_V6 = "::" PORT_ANY = 0 -IDENTIFIERS_SEPARATOR = "%" +IDENTIFIERS_SEPARATOR = "@" PATH_JSON_RPC = "/api/homematic.cgi" diff --git a/hahomematic/device.py b/hahomematic/device.py index 50dca916..56741118 100644 --- a/hahomematic/device.py +++ b/hahomematic/device.py @@ -217,7 +217,7 @@ def device_info(self) -> dict[str, Any]: """Return device specific attributes.""" return { "config_entry_id": self.central.entry_id, - "identifiers": {(HA_DOMAIN, f"{self.interface_id}{IDENTIFIERS_SEPARATOR}{self.address}")}, + "identifiers": {(HA_DOMAIN, f"{self.address}{IDENTIFIERS_SEPARATOR}{self.interface_id}")}, "name": self.name, "manufacturer": "eQ-3", "model": self.device_type, diff --git a/hahomematic/hub.py b/hahomematic/hub.py index f1a07429..014a912c 100644 --- a/hahomematic/hub.py +++ b/hahomematic/hub.py @@ -180,7 +180,7 @@ def device_info(self) -> dict[str, Any]: """Return device specific attributes.""" return { "config_entry_id": self._central.entry_id, - "identifiers": {(HA_DOMAIN, self.unique_id)}, + "identifiers": {(HA_DOMAIN, self._central.instance_name)}, "name": self.name, "manufacturer": "eQ-3", "model": self._central.model, @@ -278,7 +278,7 @@ def device_info(self) -> dict[str, Any]: """Return device specific attributes.""" return { "config_entry_id": self._central.entry_id, - "identifiers": {(HA_DOMAIN, self.unique_id)}, + "identifiers": {(HA_DOMAIN, self._central.instance_name)}, "name": self.name, "manufacturer": "eQ-3", "model": self._central.model, diff --git a/setup.py b/setup.py index 3b278fae..22091c10 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ def readme(): }, PACKAGE_NAME = "hahomematic" HERE = os.path.abspath(os.path.dirname(__file__)) -VERSION = "0.1.1" +VERSION = "0.1.2" PACKAGES = find_packages(exclude=["tests", "tests.*", "dist", "build"])