Skip to content

Commit

Permalink
Start GW heartbeat after getting subdevices status
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Albu committed Apr 15, 2023
1 parent 18980bf commit 6f5a7b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/localtuya/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ 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())))

Expand Down Expand Up @@ -376,6 +375,8 @@ async def _make_connection(self):

except Exception as e: # pylint: disable=broad-except
self.warning("Adding subdevice %s failed with exception\n %s", cid, str(e))

self._interface.start_heartbeat()

self._retry_sub_conn_interval = async_track_time_interval(
self._hass,
Expand Down

0 comments on commit 6f5a7b6

Please sign in to comment.