Add switch platform to zwave_js (#45046)
This commit is contained in:
parent
cad2fa89ed
commit
f312b87a3f
7 changed files with 893 additions and 1 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue