mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Add zwave_js discovery schema for Vision Security ZL7432 (#49510)
* Add zwave_js discovery schema for Vision Security ZL7432 * add tests * fix test * add correct fixture * Make discussed changes * fix tests * move event handler * fix logic to get entity ID * add test * make discovery test more explicit * remove domain from event data * always provide entity_id key to make automations easier and translate value if possible * formatting * comment * dont overwrite value
This commit is contained in:
@@ -337,6 +337,12 @@ def climate_radio_thermostat_ct100_mode_and_setpoint_on_different_endpoints_stat
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(name="vision_security_zl7432_state", scope="session")
|
||||
def vision_security_zl7432_state_fixture():
|
||||
"""Load the vision security zl7432 switch node state fixture data."""
|
||||
return json.loads(load_fixture("zwave_js/vision_security_zl7432_state.json"))
|
||||
|
||||
|
||||
@pytest.fixture(name="client")
|
||||
def mock_client_fixture(controller_state, version_state):
|
||||
"""Mock a client."""
|
||||
@@ -637,3 +643,11 @@ def climate_radio_thermostat_ct100_mode_and_setpoint_on_different_endpoints_fixt
|
||||
)
|
||||
client.driver.controller.nodes[node.node_id] = node
|
||||
return node
|
||||
|
||||
|
||||
@pytest.fixture(name="vision_security_zl7432")
|
||||
def vision_security_zl7432_fixture(client, vision_security_zl7432_state):
|
||||
"""Mock a vision security zl7432 node."""
|
||||
node = Node(client, copy.deepcopy(vision_security_zl7432_state))
|
||||
client.driver.controller.nodes[node.node_id] = node
|
||||
return node
|
||||
|
||||
Reference in New Issue
Block a user