Devices that are not reachable (unplugged, offline, network issue) force an uncaught exception. This exception is then logged once per device PER MINUTE, forever.
Environment
Localtuya version: 4.0.0
Last working localtuya version (if known and relevant): 3.X
Home Assistant Core version: 2022.7.5
[X] Are you using the Home Assistant Tuya Cloud component ?
[X] Are you using the Tuya App in parallel ?
Steps to reproduce
Configure normally
Take a device offline (unplug it)
Wait for logs to appear (may require a restart of HA)
Configuration configuration.yaml or config_flow
Configured via new Cloud API available in 4.0.0
DP dump
N/A
Provide Home Assistant traceback/logs
2022-07-17 13:37:35 ERROR (MainThread) [custom_components.localtuya.common] [740...e67] Connect to X.X.X.X failed
Traceback (most recent call last):
File "/config/custom_components/localtuya/common.py", line 160, in _make_connection
self._interface = await pytuya.connect(
File "/config/custom_components/localtuya/pytuya/__init__.py", line 669, in connect
_, protocol = await loop.create_connection(
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
sock = await self._connect_sock(
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
return await fut
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('X.X.X.X', 6668)
The problem
Devices that are not reachable (unplugged, offline, network issue) force an uncaught exception. This exception is then logged once per device PER MINUTE, forever.
Environment
Steps to reproduce
Configuration
configuration.yaml
orconfig_flow
Configured via new Cloud API available in 4.0.0
DP dump
N/A
Provide Home Assistant traceback/logs
Additional information
N/A