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

Add switch platform to zwave_js (#45046)

This commit is contained in:
Charles Garwood
2021-01-11 18:40:39 -05:00
committed by GitHub
parent cad2fa89ed
commit f312b87a3f
7 changed files with 893 additions and 1 deletions

View File

@@ -31,6 +31,12 @@ def multisensor_6_state_fixture():
return json.loads(load_fixture("zwave_js/multisensor_6_state.json"))
@pytest.fixture(name="hank_binary_switch_state", scope="session")
def binary_switch_state_fixture():
"""Load the hank binary switch node state fixture data."""
return json.loads(load_fixture("zwave_js/hank_binary_switch_state.json"))
@pytest.fixture(name="client")
def mock_client_fixture(controller_state):
"""Mock a client."""
@@ -50,6 +56,14 @@ def multisensor_6_fixture(client, multisensor_6_state):
return node
@pytest.fixture(name="hank_binary_switch")
def hank_binary_switch_fixture(client, hank_binary_switch_state):
"""Mock a binary switch node."""
node = Node(client, hank_binary_switch_state)
client.driver.controller.nodes[node.node_id] = node
return node
@pytest.fixture(name="integration")
async def integration_fixture(hass, client):
"""Set up the zwave_js integration."""