Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions homeassistant/components/zwave_js/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,14 @@ def get_config_parameter_discovery_schema(
# Leviton ZW4SF fan controllers using switch multilevel CC
ZWaveDiscoverySchema(
platform=Platform.FAN,
hint="has_fan_value_mapping",
manufacturer_id={0x001D},
product_id={0x0002},
product_type={0x0038},
primary_value=SWITCH_MULTILEVEL_CURRENT_VALUE_SCHEMA,
data_template=FixedFanValueMappingDataTemplate(
FanValueMapping(speeds=[(1, 25), (26, 50), (51, 75), (76, 99)]),
),
),
# Inovelli LZW36 light / fan controller combo using switch multilevel CC
# The fan is endpoint 2, the light is endpoint 1.
Expand Down
14 changes: 14 additions & 0 deletions tests/components/zwave_js/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -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."""
Expand Down
Loading