Skip to content

Commit 6c68494

Browse files
committed
Fix fake gateway doesn't check for new gateway.
1 parent 3d0a22d commit 6c68494

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

custom_components/localtuya/common.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ async def _make_connection(self):
332332
if self._fake_gateway:
333333
self.warning(f"Failed to use {name} as gateway.")
334334
await self.abort_connect()
335+
await self.update_local_key()
335336

336337
if self._interface is not None:
337338
# Attempt to restore status for all entities that need to first set
@@ -424,7 +425,7 @@ async def update_local_key(self):
424425
new_data = self._config_entry.data.copy()
425426
self._local_key = cloud_localkey
426427

427-
if self.is_subdevice:
428+
if self._node_id:
428429
from .core.helpers import get_gateway_by_deviceid
429430

430431
# Update Node ID.

0 commit comments

Comments
 (0)