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 button platform to devolo Home Network #85834
Conversation
Hey there @2Fake, 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.
Made suggestion
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
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.
Something more
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.
Looks good, thanks for making the changes.
except DevicePasswordProtected as ex: | ||
self.entry.async_start_reauth(self.hass) | ||
raise HomeAssistantError( | ||
f"Device {self.entry.title} is password protected" |
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.
Is this the right error message? Seems like it's something like auth is expired or invalidated and needs to be reauthenticated?
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.
The devolo devices are a bit nasty here. As a user, you don't have to set a password and if you do you can still get data without using the password. On top, there is no non-writing endpoint I could check. So the first time Home Assistent notices a protected device is a failing action.
That's why chose this message.
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.
Oh interesting. Let me see if I understand correctly, the flow is:
- set up the device in the config flow (either zero conf or user enters ip address). no password is set
- users presses button and the command fails, and starts reauth
- user enters password for the first time via the "reauth" flow
What exception is thrown if the password is incorrect? I'm assuming it's the same exception so maybe something like this:
f"Device {self.entry.title} requires password or needs re-authenticatication"
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 this topic remains to be set.
I could also see a message something like f"Device {self.entry.title} require re-authenticatication to set or change the password"
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.
Looks good to me, i had one minor suggestion w.r.t. the error message but otherwise looks good, thanks
Hi @allenporter , @gjohansson-ST , I updated this MR to adapt to the recent development (#90471 and #80126). Could we finish this? |
I think only the error message to the user remains as I also just commented. Setting this to draft until updated. |
I updated the message, @gjohansson-ST . Originally I thought that it was a recommendation, so I didn't change it right away. Now everything should be set. |
Proposed change
Add the button platform to the devolo Home Network integration. As the button platform does not require a coordinator, I introduced a basic non-coordinated entity and had to duplicate a few lines. If there is a better way, please let me know.
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
.To help with the load of incoming pull requests: