Add preheating HVAC action to climate (#94677)
* Add preheating HVAC action to climate * Fix MQTT tests
This commit is contained in:
parent
26be0fab78
commit
be05a749c5
3 changed files with 3 additions and 1 deletions
|
@ -96,6 +96,7 @@ class HVACAction(StrEnum):
|
|||
HEATING = "heating"
|
||||
IDLE = "idle"
|
||||
OFF = "off"
|
||||
PREHEATING = "preheating"
|
||||
|
||||
|
||||
# These CURRENT_HVAC_* constants are deprecated as of Home Assistant 2022.5.
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
"name": "Current action",
|
||||
"state": {
|
||||
"off": "Off",
|
||||
"preheating": "Preheating",
|
||||
"heating": "Heating",
|
||||
"cooling": "Cooling",
|
||||
"drying": "Drying",
|
||||
|
|
|
@ -966,7 +966,7 @@ async def test_handle_action_received(
|
|||
hvac_action = state.attributes.get(ATTR_HVAC_ACTION)
|
||||
assert hvac_action is None
|
||||
# Redefine actions according to https://developers.home-assistant.io/docs/core/entity/climate/#hvac-action
|
||||
actions = ["off", "heating", "cooling", "drying", "idle", "fan"]
|
||||
actions = ["off", "preheating", "heating", "cooling", "drying", "idle", "fan"]
|
||||
assert all(elem in actions for elem in HVACAction)
|
||||
for action in actions:
|
||||
async_fire_mqtt_message(hass, "action", action)
|
||||
|
|
Loading…
Add table
Reference in a new issue