-
Notifications
You must be signed in to change notification settings - Fork 712
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
34 changed files
with
530 additions
and
244 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
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.93" | ||
VERSION = "0.0.94" | ||
|
||
|
||
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
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,4 +1,4 @@ | ||
"""Tests for Paulmann quirks.""" | ||
"""Tests for GLEDOPTO quirks.""" | ||
|
||
import zhaquirks.gledopto.glc009 | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"""Tests for Smartwings.""" | ||
from unittest import mock | ||
|
||
import pytest | ||
from zigpy.zcl.clusters.closures import WindowCovering | ||
|
||
from zhaquirks.smartwings.wm25lz import WM25LBlinds | ||
|
||
|
||
@pytest.mark.parametrize("quirk", (WM25LBlinds,)) | ||
async def test_smartwings_inverted_commands(zigpy_device_from_quirk, quirk): | ||
"""Test that the Smartwings WM25/L-Z blind quirk inverts the up/down commands.""" | ||
|
||
device = zigpy_device_from_quirk(quirk) | ||
device.request = mock.AsyncMock() | ||
|
||
covering_cluster = device.endpoints[1].window_covering | ||
|
||
close_command_id = WindowCovering.commands_by_name["down_close"].id | ||
open_command_id = WindowCovering.commands_by_name["up_open"].id | ||
|
||
# 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" | ||
|
||
# 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" |
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.