mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Add Z-WAVE discovery entry for the GE/JASCO in-wall smart fan control (#148246)
This commit is contained in:
parent
bb17f34bae
commit
f7d132b043
@ -263,7 +263,7 @@ WINDOW_COVERING_SLAT_CURRENT_VALUE_SCHEMA = ZWaveValueDiscoverySchema(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# For device class mapping see:
|
# For device class mapping see:
|
||||||
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/deviceClasses.json
|
# https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/
|
||||||
DISCOVERY_SCHEMAS = [
|
DISCOVERY_SCHEMAS = [
|
||||||
# ====== START OF DEVICE SPECIFIC MAPPING SCHEMAS =======
|
# ====== START OF DEVICE SPECIFIC MAPPING SCHEMAS =======
|
||||||
# Honeywell 39358 In-Wall Fan Control using switch multilevel CC
|
# Honeywell 39358 In-Wall Fan Control using switch multilevel CC
|
||||||
@ -291,12 +291,16 @@ DISCOVERY_SCHEMAS = [
|
|||||||
FanValueMapping(speeds=[(1, 33), (34, 67), (68, 99)]),
|
FanValueMapping(speeds=[(1, 33), (34, 67), (68, 99)]),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
# GE/Jasco - In-Wall Smart Fan Control - 14287 / 55258 / ZW4002
|
# GE/Jasco - In-Wall Smart Fan Controls
|
||||||
ZWaveDiscoverySchema(
|
ZWaveDiscoverySchema(
|
||||||
platform=Platform.FAN,
|
platform=Platform.FAN,
|
||||||
hint="has_fan_value_mapping",
|
hint="has_fan_value_mapping",
|
||||||
manufacturer_id={0x0063},
|
manufacturer_id={0x0063},
|
||||||
product_id={0x3131, 0x3337},
|
product_id={
|
||||||
|
0x3131,
|
||||||
|
0x3337, # 14287 / 55258 / ZW4002
|
||||||
|
0x3533, # 58446 / ZWA4013
|
||||||
|
},
|
||||||
product_type={0x4944},
|
product_type={0x4944},
|
||||||
primary_value=SWITCH_MULTILEVEL_CURRENT_VALUE_SCHEMA,
|
primary_value=SWITCH_MULTILEVEL_CURRENT_VALUE_SCHEMA,
|
||||||
data_template=FixedFanValueMappingDataTemplate(
|
data_template=FixedFanValueMappingDataTemplate(
|
||||||
|
@ -325,6 +325,12 @@ def ge_12730_state_fixture() -> dict[str, Any]:
|
|||||||
return load_json_object_fixture("fan_ge_12730_state.json", DOMAIN)
|
return load_json_object_fixture("fan_ge_12730_state.json", DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(name="enbrighten_58446_zwa4013_state", scope="package")
|
||||||
|
def enbrighten_58446_zwa4013_state_fixture() -> dict[str, Any]:
|
||||||
|
"""Load the Enbrighten/GE 58446/zwa401 node state fixture data."""
|
||||||
|
return load_json_object_fixture("enbrighten_58446_zwa4013_state.json", DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="aeotec_radiator_thermostat_state", scope="package")
|
@pytest.fixture(name="aeotec_radiator_thermostat_state", scope="package")
|
||||||
def aeotec_radiator_thermostat_state_fixture() -> dict[str, Any]:
|
def aeotec_radiator_thermostat_state_fixture() -> dict[str, Any]:
|
||||||
"""Load the Aeotec Radiator Thermostat node state fixture data."""
|
"""Load the Aeotec Radiator Thermostat node state fixture data."""
|
||||||
@ -1078,6 +1084,14 @@ def ge_12730_fixture(client, ge_12730_state) -> Node:
|
|||||||
return node
|
return node
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(name="enbrighten_58446_zwa4013")
|
||||||
|
def enbrighten_58446_zwa4013_fixture(client, enbrighten_58446_zwa4013_state) -> Node:
|
||||||
|
"""Mock a Enbrighten_58446/zwa4013 fan controller node."""
|
||||||
|
node = Node(client, copy.deepcopy(enbrighten_58446_zwa4013_state))
|
||||||
|
client.driver.controller.nodes[node.node_id] = node
|
||||||
|
return node
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="inovelli_lzw36")
|
@pytest.fixture(name="inovelli_lzw36")
|
||||||
def inovelli_lzw36_fixture(client, inovelli_lzw36_state) -> Node:
|
def inovelli_lzw36_fixture(client, inovelli_lzw36_state) -> Node:
|
||||||
"""Mock a Inovelli LZW36 fan controller node."""
|
"""Mock a Inovelli LZW36 fan controller node."""
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -98,6 +98,20 @@ async def test_ge_12730(hass: HomeAssistant, client, ge_12730, integration) -> N
|
|||||||
assert state
|
assert state
|
||||||
|
|
||||||
|
|
||||||
|
async def test_enbrighten_58446_zwa4013(
|
||||||
|
hass: HomeAssistant, client, enbrighten_58446_zwa4013, integration
|
||||||
|
) -> None:
|
||||||
|
"""Test GE 12730 Fan Controller v2.0 multilevel switch is discovered as a fan."""
|
||||||
|
node = enbrighten_58446_zwa4013
|
||||||
|
assert node.device_class.specific.label == "Multilevel Power Switch"
|
||||||
|
|
||||||
|
state = hass.states.get("light.zwa4013_fan")
|
||||||
|
assert not state
|
||||||
|
|
||||||
|
state = hass.states.get("fan.zwa4013_fan")
|
||||||
|
assert state
|
||||||
|
|
||||||
|
|
||||||
async def test_inovelli_lzw36(
|
async def test_inovelli_lzw36(
|
||||||
hass: HomeAssistant, client, inovelli_lzw36, integration
|
hass: HomeAssistant, client, inovelli_lzw36, integration
|
||||||
) -> None:
|
) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user