-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Log reason for DLNA-DMR device becoming unavailable #57516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log reason for DLNA-DMR device becoming unavailable #57516
Conversation
Hey there @StevenLooman, mind taking a look at this pull request as it has been labeled with an integration ( |
except UpnpError: | ||
_LOGGER.debug("Device unavailable") | ||
except UpnpError as err: | ||
_LOGGER.debug("Device unavailable: %r", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not %s
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%r
will print the error class as well as the error message, which allows distinguishing subtypes of UpnpError
. They don't all have an error message, which is what %s
would print.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clear yet simple improvement for anyone debugging these devices, so let's get it merged!
Proposed change
When a DLNA-DMR device is disconnected due to a UpnpError, log this to the debug log. This is to help diagnose the problem in #57240.
When this is accepted, can it please be cherry-picked into release 2010.10 too?
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: