-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt v2 quirks to new zigpy API (#3280)
* Use new zigpy quirks v2 API * Bump requirements to zigpy 0.65.2
- Loading branch information
1 parent
e3c115e
commit 54bed86
Showing
5 changed files
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,5 @@ pytest-sugar | |
pytest-timeout | ||
pytest-asyncio | ||
pytest>=7.1.3 | ||
zigpy>=0.63.5 | ||
zigpy>=0.65.2 | ||
ruff==0.0.261 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
"""IKEA plugs quirk.""" | ||
|
||
from zigpy.quirks.v2 import add_to_registry_v2 | ||
from zigpy.quirks.v2 import QuirkBuilder | ||
from zigpy.zcl.clusters.general import LevelControl | ||
|
||
from zhaquirks.ikea import IKEA | ||
|
||
# remove LevelControl for plugs to not show config options in ZHA | ||
( | ||
add_to_registry_v2(IKEA, "TRADFRI control outlet") | ||
QuirkBuilder(IKEA, "TRADFRI control outlet") | ||
.also_applies_to(IKEA, "TRETAKT Smart plug") | ||
.removes(LevelControl.cluster_id) | ||
.add_to_registry() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters