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

Add zwave_js speed configuration for Leviton ZW4SF fans (#60677)

* Add speed info for Leviton 4 speed fans

* Use new format for fan speed configuration

* Add a fixture and test for the Leviton ZW4SF

* Use pytest.approx
This commit is contained in:
Michael Kowalchuk
2022-09-09 13:06:01 -07:00
committed by GitHub
parent 8084d163d3
commit 19cf5dfc6d
4 changed files with 9839 additions and 6 deletions

View File

@@ -404,6 +404,12 @@ def hs_fc200_state_fixture():
return json.loads(load_fixture("zwave_js/fan_hs_fc200_state.json"))
@pytest.fixture(name="leviton_zw4sf_state", scope="session")
def leviton_zw4sf_state_fixture():
"""Load the Leviton ZW4SF node state fixture data."""
return json.loads(load_fixture("zwave_js/leviton_zw4sf_state.json"))
@pytest.fixture(name="gdc_zw062_state", scope="session")
def motorized_barrier_cover_state_fixture():
"""Load the motorized barrier cover node state fixture data."""
@@ -874,6 +880,14 @@ def hs_fc200_fixture(client, hs_fc200_state):
return node
@pytest.fixture(name="leviton_zw4sf")
def leviton_zw4sf_fixture(client, leviton_zw4sf_state):
"""Mock a fan node."""
node = Node(client, copy.deepcopy(leviton_zw4sf_state))
client.driver.controller.nodes[node.node_id] = node
return node
@pytest.fixture(name="null_name_check")
def null_name_check_fixture(client, null_name_check_state):
"""Mock a node with no name."""