1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Fix no value error for heatit climate entities (#51392)

This commit is contained in:
Raman Gupta
2021-06-03 00:07:47 -04:00
committed by GitHub
parent 7f6e20dcbc
commit ba6a0b5793
4 changed files with 1279 additions and 1 deletions

View File

@@ -261,6 +261,14 @@ def climate_heatit_z_trm2fx_state_fixture():
return json.loads(load_fixture("zwave_js/climate_heatit_z_trm2fx_state.json"))
@pytest.fixture(name="climate_heatit_z_trm3_no_value_state", scope="session")
def climate_heatit_z_trm3_no_value_state_fixture():
"""Load the climate HEATIT Z-TRM3 thermostat node w/no value state fixture data."""
return json.loads(
load_fixture("zwave_js/climate_heatit_z_trm3_no_value_state.json")
)
@pytest.fixture(name="nortek_thermostat_state", scope="session")
def nortek_thermostat_state_fixture():
"""Load the nortek thermostat node state fixture data."""
@@ -517,6 +525,16 @@ def climate_eurotronic_spirit_z_fixture(client, climate_eurotronic_spirit_z_stat
return node
@pytest.fixture(name="climate_heatit_z_trm3_no_value")
def climate_heatit_z_trm3_no_value_fixture(
client, climate_heatit_z_trm3_no_value_state
):
"""Mock a climate radio HEATIT Z-TRM3 node."""
node = Node(client, copy.deepcopy(climate_heatit_z_trm3_no_value_state))
client.driver.controller.nodes[node.node_id] = node
return node
@pytest.fixture(name="climate_heatit_z_trm3")
def climate_heatit_z_trm3_fixture(client, climate_heatit_z_trm3_state):
"""Mock a climate radio HEATIT Z-TRM3 node."""