diff --git a/homeassistant/components/rest/sensor.py b/homeassistant/components/rest/sensor.py index 36fd27c29a5..70424325241 100644 --- a/homeassistant/components/rest/sensor.py +++ b/homeassistant/components/rest/sensor.py @@ -201,11 +201,13 @@ class RestSensor(Entity): self.rest.update() value = self.rest.data + _LOGGER.debug("Data fetched from resource: %s", value) content_type = self.rest.headers.get("content-type") if content_type and content_type.startswith("text/xml"): try: value = json.dumps(xmltodict.parse(value)) + _LOGGER.debug("JSON converted from XML: %s", value) except ExpatError: _LOGGER.warning( "REST xml result could not be parsed and converted to JSON."