mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Add Humidifier support to zwave_js (#65847)
This commit is contained in:
@@ -276,6 +276,12 @@ def climate_radio_thermostat_ct100_plus_different_endpoints_state_fixture():
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(name="climate_adc_t3000_state", scope="session")
|
||||
def climate_adc_t3000_state_fixture():
|
||||
"""Load the climate ADC-T3000 node state fixture data."""
|
||||
return json.loads(load_fixture("zwave_js/climate_adc_t3000_state.json"))
|
||||
|
||||
|
||||
@pytest.fixture(name="climate_danfoss_lc_13_state", scope="session")
|
||||
def climate_danfoss_lc_13_state_fixture():
|
||||
"""Load the climate Danfoss (LC-13) electronic radiator thermostat node state fixture data."""
|
||||
@@ -610,6 +616,46 @@ def climate_radio_thermostat_ct100_plus_different_endpoints_fixture(
|
||||
return node
|
||||
|
||||
|
||||
@pytest.fixture(name="climate_adc_t3000")
|
||||
def climate_adc_t3000_fixture(client, climate_adc_t3000_state):
|
||||
"""Mock a climate ADC-T3000 node."""
|
||||
node = Node(client, copy.deepcopy(climate_adc_t3000_state))
|
||||
client.driver.controller.nodes[node.node_id] = node
|
||||
return node
|
||||
|
||||
|
||||
@pytest.fixture(name="climate_adc_t3000_missing_setpoint")
|
||||
def climate_adc_t3000_missing_setpoint_fixture(client, climate_adc_t3000_state):
|
||||
"""Mock a climate ADC-T3000 node with missing de-humidify setpoint."""
|
||||
data = copy.deepcopy(climate_adc_t3000_state)
|
||||
data["name"] = f"{data['name']} missing setpoint"
|
||||
for value in data["values"][:]:
|
||||
if (
|
||||
value["commandClassName"] == "Humidity Control Setpoint"
|
||||
and value["propertyKeyName"] == "De-humidifier"
|
||||
):
|
||||
data["values"].remove(value)
|
||||
node = Node(client, data)
|
||||
client.driver.controller.nodes[node.node_id] = node
|
||||
return node
|
||||
|
||||
|
||||
@pytest.fixture(name="climate_adc_t3000_missing_mode")
|
||||
def climate_adc_t3000_missing_mode_fixture(client, climate_adc_t3000_state):
|
||||
"""Mock a climate ADC-T3000 node with missing mode setpoint."""
|
||||
data = copy.deepcopy(climate_adc_t3000_state)
|
||||
data["name"] = f"{data['name']} missing mode"
|
||||
for value in data["values"]:
|
||||
if value["commandClassName"] == "Humidity Control Mode":
|
||||
states = value["metadata"]["states"]
|
||||
for key in list(states.keys()):
|
||||
if states[key] == "De-humidify":
|
||||
del states[key]
|
||||
node = Node(client, data)
|
||||
client.driver.controller.nodes[node.node_id] = node
|
||||
return node
|
||||
|
||||
|
||||
@pytest.fixture(name="climate_danfoss_lc_13")
|
||||
def climate_danfoss_lc_13_fixture(client, climate_danfoss_lc_13_state):
|
||||
"""Mock a climate radio danfoss LC-13 node."""
|
||||
|
||||
Reference in New Issue
Block a user