Add defrosting as HVACAction in ClimateEntity (#121448)
This commit is contained in:
parent
2def33b168
commit
26bc37195e
4 changed files with 17 additions and 5 deletions
|
@ -97,6 +97,7 @@ class HVACAction(StrEnum):
|
|||
"""HVAC action for climate devices."""
|
||||
|
||||
COOLING = "cooling"
|
||||
DEFROSTING = "defrosting"
|
||||
DRYING = "drying"
|
||||
FAN = "fan"
|
||||
HEATING = "heating"
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"default": "mdi:circle-medium",
|
||||
"state": {
|
||||
"cooling": "mdi:snowflake",
|
||||
"defrosting": "mdi:snowflake-melt",
|
||||
"drying": "mdi:water-percent",
|
||||
"fan": "mdi:fan",
|
||||
"heating": "mdi:fire",
|
||||
|
|
|
@ -69,13 +69,14 @@
|
|||
"hvac_action": {
|
||||
"name": "Current action",
|
||||
"state": {
|
||||
"off": "[%key:common::state::off%]",
|
||||
"preheating": "Preheating",
|
||||
"heating": "Heating",
|
||||
"cooling": "Cooling",
|
||||
"defrosting": "Defrosting",
|
||||
"drying": "Drying",
|
||||
"fan": "Fan",
|
||||
"heating": "Heating",
|
||||
"idle": "[%key:common::state::idle%]",
|
||||
"fan": "Fan"
|
||||
"off": "[%key:common::state::off%]",
|
||||
"preheating": "Preheating"
|
||||
}
|
||||
},
|
||||
"hvac_modes": {
|
||||
|
|
|
@ -1017,7 +1017,16 @@ async def test_handle_action_received(
|
|||
|
||||
# Cycle through valid modes
|
||||
# Redefine actions according to https://developers.home-assistant.io/docs/core/entity/climate/#hvac-action
|
||||
actions = ["off", "preheating", "heating", "cooling", "drying", "idle", "fan"]
|
||||
actions = [
|
||||
"off",
|
||||
"preheating",
|
||||
"defrosting",
|
||||
"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