Skip to content

refactor(client)!: keyword-only execute_action_group and typed gateway-selection error#2120

Merged
iMicknl merged 3 commits into
mainfrom
v2-api-polish
Jun 4, 2026
Merged

refactor(client)!: keyword-only execute_action_group and typed gateway-selection error#2120
iMicknl merged 3 commits into
mainfrom
v2-api-polish

Conversation

@iMicknl
Copy link
Copy Markdown
Owner

@iMicknl iMicknl commented Jun 4, 2026

Summary

Final API-polish items before tagging 2.0.0. Both are breaking, so they're locked in now rather than after release.

  • execute_action_group() is keyword-onlyactions/mode/label must be passed by name, matching the keyword-only constructor. Updated all callers, doc examples, and the migration guide.
  • Gateway selection raises UnsupportedOperationErrordiscover_gateways() / select_gateway() previously raised a bare TypeError. They now raise UnsupportedOperationError (in the BaseOverkizError hierarchy), so they're catchable alongside other Overkiz errors.

Also clarified the open_local_pairing() docstring. We probed the live endpoint against both Somfy and Atlantic — both return an empty {} on success — but the response shape under other conditions is unconfirmed, so the return type stays Any and the raw response is passed through untouched (can be narrowed in a 2.x minor without breaking callers).

Test plan

  • pytest — 518 passed
  • ruff check / ruff format — clean
  • pre-commit hooks (incl. mypy) pass

…ed gateway-selection error

Two breaking-change polish items before 2.0.0:

- execute_action_group() is now keyword-only (actions/mode/label), matching
  the keyword-only constructor. Updated all callers and docs.
- discover_gateways() / select_gateway() raise UnsupportedOperationError
  (in the BaseOverkizError hierarchy) instead of bare TypeError, so they
  are catchable alongside other Overkiz errors.

Also clarified the open_local_pairing() docstring: the endpoint returns an
empty dict on success but its shape under other conditions is unconfirmed,
so the raw response is passed through as Any.
Copilot AI review requested due to automatic review settings June 4, 2026 18:10
@iMicknl iMicknl requested a review from tetienne as a code owner June 4, 2026 18:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@iMicknl iMicknl merged commit 807de8f into main Jun 4, 2026
11 checks passed
@iMicknl iMicknl deleted the v2-api-polish branch June 4, 2026 18:18
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.

2 participants