Skip to content

Commit

Permalink
Start GW heartbeat on successful connect
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Albu committed Apr 14, 2023
1 parent d1a58f0 commit 18980bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions custom_components/localtuya/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,10 @@ async def _make_connection(self):
is_gateway=True,
)
self.debug("Connected to gateway %s successfully", self._config_entry[CONF_HOST])
self._interface.start_heartbeat()

self.debug("Attempting to reconnect %s subdevices", str(len(self._sub_devices.items())))

# Re-add and get status of previously added sub-devices
# Note this assumes the gateway device has not been tear down
for subitem in self._sub_devices.items():
Expand Down

0 comments on commit 18980bf

Please sign in to comment.