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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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."""