Add binary_sensor platform to zwave_js (#45081)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Marcel van der Veldt 2021-01-15 15:15:03 +01:00 committed by GitHub
parent e1427c45f2
commit 071c8cc67d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 811 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="ecolink_door_sensor_state", scope="session")
def ecolink_door_sensor_state_fixture():
"""Load the Ecolink Door/Window Sensor node state fixture data."""
return json.loads(load_fixture("zwave_js/ecolink_door_sensor_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."""
@ -62,6 +68,14 @@ def multisensor_6_fixture(client, multisensor_6_state):
return node
@pytest.fixture(name="ecolink_door_sensor")
def legacy_binary_sensor_fixture(client, ecolink_door_sensor_state):
"""Mock a legacy_binary_sensor node."""
node = Node(client, ecolink_door_sensor_state)
client.driver.controller.nodes[node.node_id] = node
return node
@pytest.fixture(name="hank_binary_switch")
def hank_binary_switch_fixture(client, hank_binary_switch_state):
"""Mock a binary switch node."""