Skip to content

Fix ZNPCoordinator.request() rejecting new zigpy kwargs#272

Merged
TheJulianJES merged 1 commit into
zigpy:devfrom
TheJulianJES:tjj/fix-coordinator-request-kwargs
May 30, 2026
Merged

Fix ZNPCoordinator.request() rejecting new zigpy kwargs#272
TheJulianJES merged 1 commit into
zigpy:devfrom
TheJulianJES:tjj/fix-coordinator-request-kwargs

Conversation

@TheJulianJES
Copy link
Copy Markdown
Contributor

@TheJulianJES TheJulianJES commented May 30, 2026

zigpy 1.5.0 (zigpy/zigpy#1824) moved request retries into Device.request, and ZDO.request now forwards retries/retry_delay. ZNPCoordinator.request hardcoded its kwargs and didn't accept them, raising "TypeError: ZNPCoordinator.request() got an unexpected keyword argument 'retries'" during coordinator initialization.

Use *args/**kwargs passthrough so future signature additions don't break the override, keeping only the longer default timeout.

Fixes zigpy/zigpy#1828. Requires #274 and #273 for tests to pass.

zigpy 1.5.0 (#1824) moved request retries into Device.request and
ZDO.request now forwards retries/retry_delay. ZNPCoordinator.request
hardcoded its kwargs and didn't accept them, raising
"TypeError: ZNPCoordinator.request() got an unexpected keyword
argument 'retries'" during coordinator initialization.

Use *args/**kwargs passthrough so future signature additions don't
break the override, keeping only the longer default timeout.

Fixes zigpy/zigpy#1828
Copy link
Copy Markdown

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.

Pull request overview

Forwards arbitrary args/kwargs through ZNPCoordinator.request() so newly-added zigpy parameters (e.g. retries, retry_delay introduced in zigpy 1.5.0) don't raise TypeError. The override now only customizes the default timeout.

Changes:

  • Replace hardcoded parameter list with *args, **kwargs passthrough
  • Remove now-unused zigpy.types import
  • Fix docstring reference (Device:requestDevice.request)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@puddly puddly left a comment

Choose a reason for hiding this comment

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

Thanks!

@TheJulianJES TheJulianJES merged commit fb6f613 into zigpy:dev May 30, 2026
6 of 10 checks passed
@TheJulianJES TheJulianJES mentioned this pull request May 31, 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.

Problem with 1.5.0

3 participants