mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Add support for Z-Wave JS siren (#52948)
* Add support for Z-Wave JS siren * Add additional device class to discovery * fix docstring * Remove device class specific part of discovery schema * rename test * switch to entry.async_on_remove * Fix logic based on #52971 * Use constants to unblock PR * Add support to set volume level * Update homeassistant/components/zwave_js/siren.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
@@ -429,6 +429,12 @@ def wallmote_central_scene_state_fixture():
|
||||
return json.loads(load_fixture("zwave_js/wallmote_central_scene_state.json"))
|
||||
|
||||
|
||||
@pytest.fixture(name="aeotec_zw164_siren_state", scope="session")
|
||||
def aeotec_zw164_siren_state_fixture():
|
||||
"""Load the aeotec zw164 siren node state fixture data."""
|
||||
return json.loads(load_fixture("zwave_js/aeotec_zw164_siren_state.json"))
|
||||
|
||||
|
||||
@pytest.fixture(name="client")
|
||||
def mock_client_fixture(controller_state, version_state, log_config_state):
|
||||
"""Mock a client."""
|
||||
@@ -789,6 +795,14 @@ def wallmote_central_scene_fixture(client, wallmote_central_scene_state):
|
||||
return node
|
||||
|
||||
|
||||
@pytest.fixture(name="aeotec_zw164_siren")
|
||||
def aeotec_zw164_siren_fixture(client, aeotec_zw164_siren_state):
|
||||
"""Mock a wallmote central scene node."""
|
||||
node = Node(client, copy.deepcopy(aeotec_zw164_siren_state))
|
||||
client.driver.controller.nodes[node.node_id] = node
|
||||
return node
|
||||
|
||||
|
||||
@pytest.fixture(name="firmware_file")
|
||||
def firmware_file_fixture():
|
||||
"""Return mock firmware file stream."""
|
||||
|
||||
Reference in New Issue
Block a user