-
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.
- Loading branch information
Showing
20 changed files
with
748 additions
and
32 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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
from setuptools import find_packages, setup | ||
|
||
VERSION = "0.0.83" | ||
VERSION = "0.0.84" | ||
|
||
|
||
setup( | ||
|
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,74 @@ | ||
"""Tests for Ikea Starkvind quirks.""" | ||
|
||
import zhaquirks.ikea.starkvind | ||
|
||
|
||
def test_ikea_starkvind(assert_signature_matches_quirk): | ||
"""Test new 'STARKVIND Air purifier table' signature is matched to its quirk.""" | ||
|
||
signature = { | ||
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4476, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", | ||
"endpoints": { | ||
"1": { | ||
"profile_id": 260, | ||
"device_type": "0x0007", | ||
"in_clusters": [ | ||
"0x0000", | ||
"0x0003", | ||
"0x0004", | ||
"0x0005", | ||
"0x0202", | ||
"0xfc57", | ||
"0xfc7d", | ||
], | ||
"out_clusters": ["0x0019", "0x0400", "0x042a"], | ||
}, | ||
"242": { | ||
"profile_id": 41440, | ||
"device_type": "0x0061", | ||
"in_clusters": [], | ||
"out_clusters": ["0x0021"], | ||
}, | ||
}, | ||
"manufacturer": "IKEA of Sweden", | ||
"model": "STARKVIND Air purifier", | ||
"class": "ikea.starkvind.IkeaSTARKVIND", | ||
} | ||
|
||
assert_signature_matches_quirk(zhaquirks.ikea.starkvind.IkeaSTARKVIND, signature) | ||
|
||
|
||
def test_ikea_starkvind_v2(assert_signature_matches_quirk): | ||
"""Test new 'STARKVIND Air purifier table' signature is matched to its quirk.""" | ||
|
||
signature = { | ||
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4476, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", | ||
"endpoints": { | ||
"1": { | ||
"profile_id": 260, | ||
"device_type": "0x0007", | ||
"in_clusters": [ | ||
"0x0000", | ||
"0x0003", | ||
"0x0004", | ||
"0x0005", | ||
"0x0202", | ||
"0xfc57", | ||
"0xfc7c", | ||
"0xfc7d", | ||
], | ||
"out_clusters": ["0x0019", "0x0400", "0x042a"], | ||
}, | ||
"242": { | ||
"profile_id": 41440, | ||
"device_type": "0x0061", | ||
"in_clusters": [], | ||
"out_clusters": ["0x0021"], | ||
}, | ||
}, | ||
"manufacturer": "IKEA of Sweden", | ||
"model": "STARKVIND Air purifier table", | ||
"class": "ikea.starkvind.IkeaSTARKVIND_v2", | ||
} | ||
|
||
assert_signature_matches_quirk(zhaquirks.ikea.starkvind.IkeaSTARKVIND_v2, 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
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
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
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
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
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
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
Oops, something went wrong.