1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add On/Off as target values for zwave_js cover stop action (#52881)

* Add On/Off as target values for stop cover

Certain ZWave Cover devices use On/Off instead of the more common
Open/Close and Up/Down targets for movement.
Adding On/Off to the targets used to stop the cover during movement.
Fixes issue #51963

* Add test for updated zwave_js stop cover logic
This commit is contained in:
p4p3r
2021-07-16 15:48:35 +02:00
committed by GitHub
parent 6672962f2b
commit 9d79c4f617
4 changed files with 739 additions and 6 deletions

View File

@@ -350,6 +350,12 @@ def qubino_shutter_state_fixture():
return json.loads(load_fixture("zwave_js/cover_qubino_shutter_state.json"))
@pytest.fixture(name="aeotec_nano_shutter_state", scope="session")
def aeotec_nano_shutter_state_fixture():
"""Load the Aeotec Nano Shutter node state fixture data."""
return json.loads(load_fixture("zwave_js/cover_aeotec_nano_shutter_state.json"))
@pytest.fixture(name="aeon_smart_switch_6_state", scope="session")
def aeon_smart_switch_6_state_fixture():
"""Load the AEON Labs (ZW096) Smart Switch 6 node state fixture data."""
@@ -715,6 +721,14 @@ def qubino_shutter_cover_fixture(client, qubino_shutter_state):
return node
@pytest.fixture(name="aeotec_nano_shutter")
def aeotec_nano_shutter_cover_fixture(client, aeotec_nano_shutter_state):
"""Mock a Aeotec Nano Shutter node."""
node = Node(client, copy.deepcopy(aeotec_nano_shutter_state))
client.driver.controller.nodes[node.node_id] = node
return node
@pytest.fixture(name="aeon_smart_switch_6")
def aeon_smart_switch_6_fixture(client, aeon_smart_switch_6_state):
"""Mock an AEON Labs (ZW096) Smart Switch 6 node."""