diff --git a/tinytuya/Cloud.py b/tinytuya/Cloud.py index 87e5d465..042b83f5 100644 --- a/tinytuya/Cloud.py +++ b/tinytuya/Cloud.py @@ -481,7 +481,7 @@ def getdps(self, deviceid=None): ) return response_dict - def sendcommand(self, deviceid=None, commands=None): + def sendcommand(self, deviceid=None, commands=None, uri='iot-03/devices/'): """ Send a command to the device """ @@ -492,7 +492,7 @@ def sendcommand(self, deviceid=None, commands=None): ERR_PARAMS, "Missing DeviceID and/or Command Parameters" ) - uri = 'iot-03/devices/%s/commands' % (deviceid) + uri += '%s/commands' % (deviceid) response_dict = self._tuyaplatform(uri,action='POST',post=commands) if not response_dict['success']: