Replace Climate HVAC_MODE_* constants with HVACMode enum (#70286)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
0dc426e2c4
commit
a22f36178f
8 changed files with 87 additions and 86 deletions
|
@ -212,7 +212,7 @@ async def test_set_operation_bad_attr_and_state(hass, mqtt_mock, caplog):
|
|||
with pytest.raises(vol.Invalid) as excinfo:
|
||||
await common.async_set_hvac_mode(hass, None, ENTITY_CLIMATE)
|
||||
assert (
|
||||
"value must be one of ['auto', 'cool', 'dry', 'fan_only', 'heat', 'heat_cool', 'off'] for dictionary value @ data['hvac_mode']"
|
||||
"expected HVACMode or one of 'off', 'heat', 'cool', 'heat_cool', 'auto', 'dry', 'fan_only' for dictionary value @ data['hvac_mode']"
|
||||
) in str(excinfo.value)
|
||||
state = hass.states.get(ENTITY_CLIMATE)
|
||||
assert state.state == "off"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue