Skip to content

Commit

Permalink
Use new zigpy request kwarg format (#3410)
Browse files Browse the repository at this point in the history
* Use new zigpy request kwarg format

* Add `priority`

* Add `**kwargs` to attribute reading and writing methods

* Bump minimum zigpy version to 0.68.1

---------

Co-authored-by: TheJulianJES <[email protected]>
  • Loading branch information
puddly and TheJulianJES authored Oct 16, 2024
1 parent fa734ad commit a29ad2f
Show file tree
Hide file tree
Showing 11 changed files with 552 additions and 290 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ readme = "README.md"
license = {text = "Apache License Version 2.0"}
requires-python = ">=3.12"
dependencies = [
"zigpy>=0.66.0",
"zigpy>=0.68.1",
]

[tool.setuptools.packages.find]
Expand Down
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ pytest-sugar
pytest-timeout
pytest-asyncio
pytest>=7.1.3
zigpy>=0.66.0
zigpy>=0.68.1
ruff==0.0.261
4 changes: 2 additions & 2 deletions tests/test_smartwings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ async def test_smartwings_inverted_commands(zigpy_device_from_quirk, quirk):
# close cover and check if the command is inverted
await covering_cluster.command(close_command_id)
assert len(device.request.mock_calls) == 1
assert device.request.mock_calls[0][1][5] == b"\x01\x01\x00"
assert device.request.mock_calls[0].kwargs["data"] == b"\x01\x01\x00"

# open cover and check if the command is inverted
await covering_cluster.command(open_command_id)
assert len(device.request.mock_calls) == 2
assert device.request.mock_calls[1][1][5] == b"\x01\x02\x01"
assert device.request.mock_calls[1].kwargs["data"] == b"\x01\x02\x01"
Loading

0 comments on commit a29ad2f

Please sign in to comment.