Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotate device identifier #79

Merged
merged 2 commits into from
Dec 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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