Add zwave_mqtt light platform (#35337)
This commit is contained in:
1 parent
6146eaa350
commit
7e4aa2409f
9 files changed
+423
-3
No files matched your search
@@ -15,6 +15,12 @@ def generic_data_fixture():
|
||||
return load_fixture(f"zwave_mqtt/generic_network_dump.csv")
|
||||
|
||||
|
||||
@pytest.fixture(name="light_data", scope="session")
|
||||
def light_data_fixture():
|
||||
"""Load light dimmer MQTT data and return it."""
|
||||
return load_fixture(f"zwave_mqtt/light_network_dump.csv")
|
||||
|
||||
|
||||
@pytest.fixture(name="sent_messages")
|
||||
def sent_messages_fixture():
|
||||
"""Fixture to capture sent messages."""
|
||||
@@ -29,6 +35,17 @@ def sent_messages_fixture():
|
||||
yield sent_messages
|
||||
|
||||
|
||||
@pytest.fixture(name="light_msg")
|
||||
async def light_msg_fixture(hass):
|
||||
"""Return a mock MQTT msg with a light actuator message."""
|
||||
light_json = json.loads(
|
||||
await hass.async_add_executor_job(load_fixture, "zwave_mqtt/light.json")
|
||||
)
|
||||
message = MQTTMessage(topic=light_json["topic"], payload=light_json["payload"])
|
||||
message.encode()
|
||||
return message
|
||||
|
||||
|
||||
@pytest.fixture(name="switch_msg")
|
||||
async def switch_msg_fixture(hass):
|
||||
"""Return a mock MQTT msg with a switch actuator message."""
|
||||
|
||||
Reference in new issue
Block a user