-
Notifications
You must be signed in to change notification settings - Fork 720
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for the RDM004 wall switch from philips
- Loading branch information
Showing
2 changed files
with
55 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
"""Tests for Philips quirks.""" | ||
|
||
import pytest | ||
|
||
import zhaquirks | ||
import zhaquirks.philips.wall_switch | ||
|
||
zhaquirks.setup() | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"manufacturer,model", | ||
[ | ||
("Philips", "RDM001"), | ||
("Signify Netherlands B.V.", "RDM001"), | ||
("Philips", "RDM004"), | ||
("Signify Netherlands B.V.", "RDM004"), | ||
], | ||
) | ||
def test_RDM_family_signature( | ||
manufacturer: str, model: str, assert_signature_matches_quirk | ||
) -> None: | ||
"""Test that the signature of all supported RDM devices is matched to its quirk.""" | ||
signature = { | ||
"node_descriptor": "<SimpleDescriptor endpoint=1 profile=260 device_type=2080 device_version=1 input_clusters=[0, 1, 3, 64512] output_clusters=[3, 4, 6, 8, 25]>", | ||
"endpoints": { | ||
"1": { | ||
"profile_id": 260, | ||
"device_type": "0x820", | ||
"in_clusters": [ | ||
"0x0", | ||
"0x1", | ||
"0x3", | ||
"0xFC00", | ||
], | ||
"out_clusters": ["0x3", "0x4", "0x6", "0x8", "0x19"], | ||
} | ||
}, | ||
"manufacturer": manufacturer, | ||
"model": model, | ||
"class": "zhaquirks.philips.wall_switch.PhilipsWallSwitch", | ||
} | ||
|
||
assert_signature_matches_quirk( | ||
zhaquirks.philips.wall_switch.PhilipsWallSwitch, signature | ||
) |
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