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"
|
HEATING = "heating"
|
||||||
IDLE = "idle"
|
IDLE = "idle"
|
||||||
OFF = "off"
|
OFF = "off"
|
||||||
|
PREHEATING = "preheating"
|
||||||
|
|
||||||
|
|
||||||
# These CURRENT_HVAC_* constants are deprecated as of Home Assistant 2022.5.
|
# These CURRENT_HVAC_* constants are deprecated as of Home Assistant 2022.5.
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
"name": "Current action",
|
"name": "Current action",
|
||||||
"state": {
|
"state": {
|
||||||
"off": "Off",
|
"off": "Off",
|
||||||
|
"preheating": "Preheating",
|
||||||
"heating": "Heating",
|
"heating": "Heating",
|
||||||
"cooling": "Cooling",
|
"cooling": "Cooling",
|
||||||
"drying": "Drying",
|
"drying": "Drying",
|
||||||
|
|
|
@ -966,7 +966,7 @@ async def test_handle_action_received(
|
||||||
hvac_action = state.attributes.get(ATTR_HVAC_ACTION)
|
hvac_action = state.attributes.get(ATTR_HVAC_ACTION)
|
||||||
assert hvac_action is None
|
assert hvac_action is None
|
||||||
# Redefine actions according to https://developers.home-assistant.io/docs/core/entity/climate/#hvac-action
|
# 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)
|
assert all(elem in actions for elem in HVACAction)
|
||||||
for action in actions:
|
for action in actions:
|
||||||
async_fire_mqtt_message(hass, "action", action)
|
async_fire_mqtt_message(hass, "action", action)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue