File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,26 @@ async def test_1gang_shutter_1_go_to_lift_percentage_cmd(zigpy_device_from_quirk
91
91
assert request_mock .call_args [0 ][3 ] == 42 # 100 - 58
92
92
93
93
94
+ async def test_1gang_shutter_1_unpatched_cmd (zigpy_device_from_quirk ):
95
+ """Asserts that unpatched ZCL commands keep working."""
96
+
97
+ device = zigpy_device_from_quirk (
98
+ zhaquirks .schneiderelectric .devices .shutters .OneGangShutter1
99
+ )
100
+ window_covering_cluster = device .endpoints [5 ].window_covering
101
+
102
+ p = mock .patch .object (window_covering_cluster , "request" , mock .AsyncMock ())
103
+ with p as request_mock :
104
+ request_mock .return_value = (foundation .Status .SUCCESS , "done" )
105
+
106
+ await window_covering_cluster .up_open ()
107
+
108
+ assert request_mock .call_count == 1
109
+ assert request_mock .call_args [0 ][1 ] == (
110
+ WindowCovering .ServerCommandDefs .up_open .id
111
+ )
112
+
113
+
94
114
async def test_1gang_shutter_1_lift_percentage_updates (zigpy_device_from_quirk ):
95
115
"""Asserts that updates to the ``current_position_lift_percentage`` attribute
96
116
(e.g., by the device) invert the reported percentage value."""
You can’t perform that action at this time.
0 commit comments