Add payload to debug output of rest_command (#39190)

This commit is contained in:
Hmmbob 2020-09-04 12:39:26 +02:00 committed by GitHub
parent ad3e520e09
commit 60c7a91794
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,15 +122,17 @@ async def async_setup(hass, config):
if response.status < HTTP_BAD_REQUEST:
_LOGGER.debug(
"Success. Url: %s. Status code: %d",
"Success. Url: %s. Status code: %d. Payload: %s",
response.url,
response.status,
payload,
)
else:
_LOGGER.warning(
"Error. Url: %s. Status code %d",
"Error. Url: %s. Status code %d. Payload: %s",
response.url,
response.status,
payload,
)
except asyncio.TimeoutError: