the status method is ok.
and the set_staus method is raise the error.
Traceback (most recent call last):
File "pytuya.py", line 330, in <module>
data = d.set_status(not switch_state) # This requires a valid key
File "pytuya.py", line 235, in set_status
data = s.recv(1024)
socket.error: [Errno 54] Connection reset by peer
the
status
method is ok. and theset_staus
method is raise the error.