-
-
Notifications
You must be signed in to change notification settings - Fork 35k
Add key reconfigure to UptimeRobot config flow #151562
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
base: dev
Are you sure you want to change the base?
Add key reconfigure to UptimeRobot config flow #151562
Conversation
Hey there @ludeeus, 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.
Pull Request Overview
This PR adds API key reconfiguration capability to the UptimeRobot integration's config flow. This allows users to update their API key without removing and re-adding the integration.
- Implements
async_step_reconfigure
method to handle API key updates - Adds UI strings for the reconfigure flow
- Updates quality scale documentation to mark reconfiguration-flow as complete
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
homeassistant/components/uptimerobot/config_flow.py | Adds reconfigure step implementation with API key validation and entry updates |
homeassistant/components/uptimerobot/strings.json | Adds UI strings for reconfigure form and success message |
homeassistant/components/uptimerobot/quality_scale.yaml | Updates reconfiguration-flow rule status from todo to done |
tests/components/uptimerobot/test_config_flow.py | Adds comprehensive test for successful reconfiguration flow |
@@ -296,3 +296,42 @@ async def test_reauthentication_failure_account_not_matching( | |||
assert result2["step_id"] == "reauth_confirm" | |||
assert result2["type"] is FlowResultType.FORM | |||
assert result2["errors"]["base"] == "reauth_failed_matching_account" | |||
|
|||
|
|||
async def test_reconfigure_successful( |
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.
We also need a test that aborts if we try to reconfigure with an invalid API key that does not belong to this account
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Breaking change
Proposed change
Add key reconfigure to UptimeRobot config flow
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
.To help with the load of incoming pull requests: