Skip to content

Commit

Permalink
Merge pull request #57 from alexualbu/3.7.0
Browse files Browse the repository at this point in the history
Start GW heartbeat after getting subdevices status
  • Loading branch information
leeyuentuen authored Apr 16, 2023
2 parents 918ce17 + 6f5a7b6 commit 4857a32
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 4857a32

Please sign in to comment.