Add climate platform to ozw (#35566)
This commit is contained in:
parent
f5a326c51e
commit
5bef1c223d
7 changed files with 879 additions and 1 deletions
|
@ -21,6 +21,12 @@ def light_data_fixture():
|
|||
return load_fixture("ozw/light_network_dump.csv")
|
||||
|
||||
|
||||
@pytest.fixture(name="climate_data", scope="session")
|
||||
def climate_data_fixture():
|
||||
"""Load climate MQTT data and return it."""
|
||||
return load_fixture("ozw/climate_network_dump.csv")
|
||||
|
||||
|
||||
@pytest.fixture(name="sent_messages")
|
||||
def sent_messages_fixture():
|
||||
"""Fixture to capture sent messages."""
|
||||
|
@ -88,3 +94,14 @@ async def binary_sensor_alt_msg_fixture(hass):
|
|||
message = MQTTMessage(topic=sensor_json["topic"], payload=sensor_json["payload"])
|
||||
message.encode()
|
||||
return message
|
||||
|
||||
|
||||
@pytest.fixture(name="climate_msg")
|
||||
async def climate_msg_fixture(hass):
|
||||
"""Return a mock MQTT msg with a climate mode change message."""
|
||||
sensor_json = json.loads(
|
||||
await hass.async_add_executor_job(load_fixture, "ozw/climate.json")
|
||||
)
|
||||
message = MQTTMessage(topic=sensor_json["topic"], payload=sensor_json["payload"])
|
||||
message.encode()
|
||||
return message
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue