mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Add Z-Wave discovery schema for ZVIDAR roller shades (#122332)
Add discovery schema for ZVIDAR roller shades
This commit is contained in:
parent
c98c80ce69
commit
9a3c7111f7
@ -579,6 +579,15 @@ DISCOVERY_SCHEMAS = [
|
|||||||
),
|
),
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
|
# ZVIDAR Z-CM-V01 (SmartWings/Deyi WM25L/V Z-Wave Motor for Roller Shade)
|
||||||
|
ZWaveDiscoverySchema(
|
||||||
|
platform=Platform.COVER,
|
||||||
|
hint="shade",
|
||||||
|
manufacturer_id={0x045A},
|
||||||
|
product_id={0x0507},
|
||||||
|
product_type={0x0904},
|
||||||
|
primary_value=SWITCH_MULTILEVEL_CURRENT_VALUE_SCHEMA,
|
||||||
|
),
|
||||||
# Vision Security ZL7432 In Wall Dual Relay Switch
|
# Vision Security ZL7432 In Wall Dual Relay Switch
|
||||||
ZWaveDiscoverySchema(
|
ZWaveDiscoverySchema(
|
||||||
platform=Platform.SWITCH,
|
platform=Platform.SWITCH,
|
||||||
|
@ -488,6 +488,12 @@ def iblinds_v3_state_fixture():
|
|||||||
return json.loads(load_fixture("zwave_js/cover_iblinds_v3_state.json"))
|
return json.loads(load_fixture("zwave_js/cover_iblinds_v3_state.json"))
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(name="zvidar_state", scope="package")
|
||||||
|
def zvidar_state_fixture():
|
||||||
|
"""Load the ZVIDAR node state fixture data."""
|
||||||
|
return json.loads(load_fixture("zwave_js/cover_zvidar_state.json"))
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="qubino_shutter_state", scope="package")
|
@pytest.fixture(name="qubino_shutter_state", scope="package")
|
||||||
def qubino_shutter_state_fixture():
|
def qubino_shutter_state_fixture():
|
||||||
"""Load the Qubino Shutter node state fixture data."""
|
"""Load the Qubino Shutter node state fixture data."""
|
||||||
@ -1097,6 +1103,14 @@ def iblinds_v3_cover_fixture(client, iblinds_v3_state):
|
|||||||
return node
|
return node
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(name="zvidar")
|
||||||
|
def zvidar_cover_fixture(client, zvidar_state):
|
||||||
|
"""Mock a ZVIDAR window cover node."""
|
||||||
|
node = Node(client, copy.deepcopy(zvidar_state))
|
||||||
|
client.driver.controller.nodes[node.node_id] = node
|
||||||
|
return node
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="qubino_shutter")
|
@pytest.fixture(name="qubino_shutter")
|
||||||
def qubino_shutter_cover_fixture(client, qubino_shutter_state):
|
def qubino_shutter_cover_fixture(client, qubino_shutter_state):
|
||||||
"""Mock a Qubino flush shutter node."""
|
"""Mock a Qubino flush shutter node."""
|
||||||
|
1120
tests/components/zwave_js/fixtures/cover_zvidar_state.json
Normal file
1120
tests/components/zwave_js/fixtures/cover_zvidar_state.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -49,6 +49,18 @@ async def test_iblinds_v2(hass: HomeAssistant, client, iblinds_v2, integration)
|
|||||||
assert state
|
assert state
|
||||||
|
|
||||||
|
|
||||||
|
async def test_zvidar_state(hass: HomeAssistant, client, zvidar, integration) -> None:
|
||||||
|
"""Test that an ZVIDAR Z-CM-V01 multilevel switch value is discovered as a cover."""
|
||||||
|
node = zvidar
|
||||||
|
assert node.device_class.specific.label == "Unused"
|
||||||
|
|
||||||
|
state = hass.states.get("light.window_blind_controller")
|
||||||
|
assert not state
|
||||||
|
|
||||||
|
state = hass.states.get("cover.window_blind_controller")
|
||||||
|
assert state
|
||||||
|
|
||||||
|
|
||||||
async def test_ge_12730(hass: HomeAssistant, client, ge_12730, integration) -> None:
|
async def test_ge_12730(hass: HomeAssistant, client, ge_12730, integration) -> None:
|
||||||
"""Test GE 12730 Fan Controller v2.0 multilevel switch is discovered as a fan."""
|
"""Test GE 12730 Fan Controller v2.0 multilevel switch is discovered as a fan."""
|
||||||
node = ge_12730
|
node = ge_12730
|
||||||
|
Loading…
x
Reference in New Issue
Block a user