Skip to content

Commit

Permalink
Rotate device identifier (#79)
Browse files Browse the repository at this point in the history
* Rotate device identifier

* Update setup.py
  • Loading branch information
SukramJ authored Dec 21, 2021
1 parent 87552b4 commit 8c5b163
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion hahomematic/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion hahomematic/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions hahomematic/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand Down

0 comments on commit 8c5b163

Please sign in to comment.