core icon indicating copy to clipboard operation
core copied to clipboard

Add reconfigure flow to ntfy integration

Open tr4nt0r opened this issue 10 months ago • 2 comments

Proposed change

Adds a reconfigure flow to the ntfy integration.

There are 2 possible reconfigure flows:

  • If a config entry is configured without credentials, reconfigure will allow to add authentication to the config entry. Either by entering credentials, a token will be created automatically, or by entering an existing token directly.
  • If a config entry configured with a username, reconfigure will allow to update the access token, either by entering a password, the new token will be created automatically or by entering the token directly. The username cannot be updated.

Type of change

  • [ ] Dependency upgrade
  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [ ] New integration (thank you!)
  • [x] New feature (which adds functionality to an existing integration)
  • [ ] Deprecation (breaking change to happen in the future)
  • [ ] Breaking change (fix/feature causing existing functionality to break)
  • [ ] Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • [x] The code change is tested and works locally.
  • [x] Local tests pass. Your PR cannot be merged unless tests pass
  • [x] There is no commented out code in this PR.
  • [x] I have followed the development checklist
  • [x] I have followed the perfect PR recommendations
  • [x] The code has been formatted using Ruff (ruff format homeassistant tests)
  • [x] Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • [ ] The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • [ ] New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

tr4nt0r avatar Apr 27 '25 01:04 tr4nt0r

The config flow could have been more user friendly. reconfigure

I think it will be better to split the flow into 3 steps:

  • choose authentication type step - this is the initial step which will continue to either the username/password step or the api token step depending on what option the user selects.
  • username/password step
  • api token step

hanwg avatar May 11 '25 01:05 hanwg

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:

Learn more about our pull request process.

home-assistant[bot] avatar May 12 '25 09:05 home-assistant[bot]

@zweckj I think you forgot to merge this one 😬

tr4nt0r avatar Jun 20 '25 16:06 tr4nt0r