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
Add myuplink diagnostics download #109925
Conversation
Hey there @pajzo, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
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.
I think the system id should be redacted too. I think the info may contain house address, at least the old nibeuplink data could do that.
We also need to see an example of the diagnostic info to see if more things should be redacted. Preferably as some test case.
I cannot find any sensitive data in the output from the API, system id and device id are UUID-style strings. Please have a look at the file from my unit. (I dont know any emmy ;-) ) config_entry-myuplink-8016ca074b552af9dca334f133abb752 (9).json |
Serial number, and preferably device/system id. But it looks hard to filter. At least redact serial number. |
Hiding serialNumber. Keeping the id:s for the moment. After all, the output file is private to the end-user unless he/she publishes it somewhere. |
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.
Please add tests. Look at other integrations for examples.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
It took a while to make it work. I couldn't find a good example that just worked. The trick was to bypass all OAuth stuff in the optimal place. I think it became pretty clean in the end. |
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.
Thanks!
@@ -0,0 +1,22 @@ | |||
"""Tests for myuplink update module.""" |
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.
Normally this should be a separate PR. But since it's small and just tests it's ok this time.
Thank you @MartinHjelmare for your thorough review and all constructive suggestions. |
Breaking change
Proposed change
Add module for diagnostics download. All relevant data from the myUplink API is captured and dumped.
Type of change
Additional information
Checklist
ruff format 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
.To help with the load of incoming pull requests: