We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d0a22d commit 6c68494Copy full SHA for 6c68494
custom_components/localtuya/common.py
@@ -332,6 +332,7 @@ async def _make_connection(self):
332
if self._fake_gateway:
333
self.warning(f"Failed to use {name} as gateway.")
334
await self.abort_connect()
335
+ await self.update_local_key()
336
337
if self._interface is not None:
338
# Attempt to restore status for all entities that need to first set
@@ -424,7 +425,7 @@ async def update_local_key(self):
424
425
new_data = self._config_entry.data.copy()
426
self._local_key = cloud_localkey
427
- if self.is_subdevice:
428
+ if self._node_id:
429
from .core.helpers import get_gateway_by_deviceid
430
431
# Update Node ID.
0 commit comments