diff --git a/custom_components/localtuya/cloud_api.py b/custom_components/localtuya/cloud_api.py index a4960f53c..86a3b29a2 100644 --- a/custom_components/localtuya/cloud_api.py +++ b/custom_components/localtuya/cloud_api.py @@ -138,7 +138,7 @@ async def async_get_devices_list(self): return "ok" -async def async_get_device_specifications(self, device_id): + async def async_get_device_specifications(self, device_id): """Obtain the DP ID mappings for a device.""" resp = await self.async_make_request( "GET", url=f"/v1.1/devices/{device_id}/specifications" @@ -148,6 +148,8 @@ async def async_get_device_specifications(self, device_id): return {}, "Request failed, status " + str(resp.status) r_json = resp.json() + _LOGGER.debug("SPECS resp: %s", r_json) + if not r_json["success"]: return {}, f"Error {r_json['code']}: {r_json['msg']}"