Skip to content

HGP-67: Allow replacing the access token in the reconfigure flow - #67

Merged
JtheGunner merged 2 commits into
mainfrom
feat/reconfigure-token
Nov 27, 2026
Merged

JtheGunner merged 2 commits into
mainfrom
feat/reconfigure-token

Conversation

@JtheGunner

Copy link
Copy Markdown
Owner

YouTrack: https://youtrack.xn--wrm-hoa.li/issue/HGP-67

Adds an optional access token field to the reconfigure step, so a still-valid token can be rotated without deleting the entry.

  • An empty or whitespace-only field keeps the stored token.
  • A new token is verified against the enabled modules and must belong to the same GitHub account; token and token type are then stored.
  • Wrong account (wrong_account), invalid token (invalid_auth) and missing access (module_unavailable) are shown as form errors and leave the old token untouched.
  • English and German translations, README and CHANGELOG updated.

Commits:

  • feat: allow replacing the access token in the reconfigure flow
  • test: assert the token type is stored on token replacement

Test plan:

  • pytest -q, ruff check ., ruff format --check . and mypy custom_components pass.
  • Manually: open the integration, choose Reconfigure, enter a new token and confirm the sensors keep updating; repeat with a token of another account and expect an error.

Review: PASS @ 0d02c90

Add an optional token field to the reconfigure step so a still-valid token can be rotated without deleting the entry. The new token is verified against the enabled modules and the stored account.
@JtheGunner
JtheGunner merged commit bda40c8 into main Nov 27, 2026
4 checks passed
@JtheGunner
JtheGunner deleted the feat/reconfigure-token branch November 27, 2026 07:18
@JtheGunner JtheGunner mentioned this pull request Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant