Skip to content

Commit

Permalink
fix unique id
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Costante committed Jul 28, 2023
1 parent 96f1236 commit 9f4cd26
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"ExpandedNodes": [
"",
"\\.github\\workflows",
"\\custom_components",
"\\custom_components\\climate_ip"
],
"SelectedNode": "\\custom_components\\climate_ip\\ac14k_m.pem",
"SelectedNode": "\\custom_components\\climate_ip\\manifest.json",
"PreviewInSolutionExplorer": false
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .vs/samsungrac/v17/.wsuo
Binary file not shown.
Binary file modified .vs/slnx.sqlite
Binary file not shown.
14 changes: 10 additions & 4 deletions custom_components/climate_ip/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,16 @@ def should_poll(self):

@property
def unique_id(self):
if self._unique_id is None and self.rac.unique_id is not None:
_LOGGER.info("About to set unique id {}".format(self.rac.unique_id))
self._unique_id = "climate_ip_" + self.rac.unique_id

#if self._unique_id is None and self.rac.unique_id is not None:
# _LOGGER.info("About to set unique id {}".format(self.rac.unique_id))
# self._unique_id = "climate_ip_" + self.rac.unique_id

if self._unique_id is None:
name_value = self._name #config.get(CONF_MAC, None) #self._cfg.duid
_LOGGER.info("About to set unique id {}".format(name_value))
self._unique_id = "climate_ip_" + name_value


_LOGGER.info("Returning unique id of {}".format(self._unique_id))
return self._unique_id

Expand Down

0 comments on commit 9f4cd26

Please sign in to comment.