mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Add zwave_js support for HeatIt Z-TRM2fx (#50317)
* Add zwave_js support for HeatIt Z-TRM2fx * fix docstring * use AwesomeVersion to support firmware version ranges * add guard against empty firmware range * switch guard approach to raise exception sooner * make post init more generic * Set up firmware range schema as AwesomeVersion during initialization * Update homeassistant/components/zwave_js/discovery.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Allow min_ver and max_ver to be None * fix docstring * reduce import scope Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
@@ -240,6 +240,12 @@ def climate_heatit_z_trm3_state_fixture():
|
||||
return json.loads(load_fixture("zwave_js/climate_heatit_z_trm3_state.json"))
|
||||
|
||||
|
||||
@pytest.fixture(name="climate_heatit_z_trm2fx_state", scope="session")
|
||||
def climate_heatit_z_trm2fx_state_fixture():
|
||||
"""Load the climate HEATIT Z-TRM2fx thermostat node state fixture data."""
|
||||
return json.loads(load_fixture("zwave_js/climate_heatit_z_trm2fx_state.json"))
|
||||
|
||||
|
||||
@pytest.fixture(name="nortek_thermostat_state", scope="session")
|
||||
def nortek_thermostat_state_fixture():
|
||||
"""Load the nortek thermostat node state fixture data."""
|
||||
@@ -484,6 +490,14 @@ def climate_heatit_z_trm3_fixture(client, climate_heatit_z_trm3_state):
|
||||
return node
|
||||
|
||||
|
||||
@pytest.fixture(name="climate_heatit_z_trm2fx")
|
||||
def climate_heatit_z_trm2fx_fixture(client, climate_heatit_z_trm2fx_state):
|
||||
"""Mock a climate radio HEATIT Z-TRM2fx node."""
|
||||
node = Node(client, copy.deepcopy(climate_heatit_z_trm2fx_state))
|
||||
client.driver.controller.nodes[node.node_id] = node
|
||||
return node
|
||||
|
||||
|
||||
@pytest.fixture(name="nortek_thermostat")
|
||||
def nortek_thermostat_fixture(client, nortek_thermostat_state):
|
||||
"""Mock a nortek thermostat node."""
|
||||
|
||||
Reference in New Issue
Block a user