Fix Climate device HVAC mode trigger UI (#84930)
* Fix Climate device HVAC mode trigger UI * Use updated order of test case results
This commit is contained in:
parent
812665cda4
commit
0ae55fb58b
2 changed files with 21 additions and 2 deletions
|
@ -174,7 +174,10 @@ async def async_get_trigger_capabilities(
|
|||
if trigger_type == "hvac_mode_changed":
|
||||
return {
|
||||
"extra_fields": vol.Schema(
|
||||
{vol.Optional(CONF_FOR): cv.positive_time_period_dict}
|
||||
{
|
||||
vol.Required(state_trigger.CONF_TO): vol.In(const.HVAC_MODES),
|
||||
vol.Optional(CONF_FOR): cv.positive_time_period_dict,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -270,7 +270,23 @@ async def test_get_trigger_capabilities_hvac_mode(hass):
|
|||
|
||||
assert voluptuous_serialize.convert(
|
||||
capabilities["extra_fields"], custom_serializer=cv.custom_serializer
|
||||
) == [{"name": "for", "optional": True, "type": "positive_time_period_dict"}]
|
||||
) == [
|
||||
{
|
||||
"name": "to",
|
||||
"options": [
|
||||
("off", "off"),
|
||||
("heat", "heat"),
|
||||
("cool", "cool"),
|
||||
("heat_cool", "heat_cool"),
|
||||
("auto", "auto"),
|
||||
("dry", "dry"),
|
||||
("fan_only", "fan_only"),
|
||||
],
|
||||
"required": True,
|
||||
"type": "select",
|
||||
},
|
||||
{"name": "for", "optional": True, "type": "positive_time_period_dict"},
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue