Simplify mobile app debugging by adding sender device name (#38518)

* Simplify mobile app debugging by adding sender device name.

* Reformatted webhook.py with black
This commit is contained in:
Anna Tikhomirova 2020-08-28 20:36:59 +03:00 committed by GitHub
parent 3377f6b12a
commit 33a05541a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,8 +184,13 @@ async def handle_webhook(
_LOGGER.error("Received invalid webhook type: %s", webhook_type)
return empty_okay_response()
device_name = config_entry.data[ATTR_DEVICE_NAME]
_LOGGER.debug(
"Received webhook payload for type %s: %s", webhook_type, webhook_payload
"Received webhook payload from %s for type %s: %s",
device_name,
webhook_type,
webhook_payload,
)
# Shield so we make sure we finish the webhook, even if sender hangs up.