From d1f00c1fc328debd65d5f74caf14cb184570206c Mon Sep 17 00:00:00 2001 From: krystadamianpzpn Date: Wed, 20 Dec 2023 10:43:19 +0100 Subject: [PATCH] FIX for generation custom id Signed-off-by: krystadamianpzpn --- .gitignore | 3 ++- custom_components/tech/climate.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ba0430d..259ed2a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -__pycache__/ \ No newline at end of file +__pycache__/ +.idea diff --git a/custom_components/tech/climate.py b/custom_components/tech/climate.py index 3ce3c88..daa01fa 100644 --- a/custom_components/tech/climate.py +++ b/custom_components/tech/climate.py @@ -50,6 +50,7 @@ def __init__(self, device, api, config_entry): self._config_entry = config_entry self._api = api self._id = device["zone"]["id"] + self._uuid = config_entry.data["udid"] + "_" + str(device["zone"]["id"]) self.update_properties(device) def update_properties(self, device): @@ -78,7 +79,7 @@ def update_properties(self, device): @property def unique_id(self) -> str: """Return a unique ID.""" - return self._id + return self._uuid @property def name(self):