Add Z-Wave thermostat fan entity (#65865)
* Add Z-Wave thermostat fan entity * Fix failing test, increase number of entities to 27 * Add tests to improve coverage * Take back unrelated changes to climate.py * Clean up guard clauses, use info.primary_value, and make entity disabled by default * Fix tests * Add more tests for code coverage * Remove unused const * Remove speed parameter from overridden method since it was removed from entity * Address PR comments
This commit is contained in:
parent
4b963c2ac0
commit
21aa07e3e5
5 changed files with 517 additions and 3 deletions
|
@ -676,6 +676,22 @@ def climate_adc_t3000_missing_mode_fixture(client, climate_adc_t3000_state):
|
|||
return node
|
||||
|
||||
|
||||
@pytest.fixture(name="climate_adc_t3000_missing_fan_mode_states")
|
||||
def climate_adc_t3000_missing_fan_mode_states_fixture(client, climate_adc_t3000_state):
|
||||
"""Mock a climate ADC-T3000 node with missing 'states' metadata on Thermostat Fan Mode."""
|
||||
data = copy.deepcopy(climate_adc_t3000_state)
|
||||
data["name"] = f"{data['name']} missing fan mode states"
|
||||
for value in data["values"]:
|
||||
if (
|
||||
value["commandClassName"] == "Thermostat Fan Mode"
|
||||
and value["property"] == "mode"
|
||||
):
|
||||
del value["metadata"]["states"]
|
||||
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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue