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."""
|
"""HVAC action for climate devices."""
|
||||||
|
|
||||||
COOLING = "cooling"
|
COOLING = "cooling"
|
||||||
|
DEFROSTING = "defrosting"
|
||||||
DRYING = "drying"
|
DRYING = "drying"
|
||||||
FAN = "fan"
|
FAN = "fan"
|
||||||
HEATING = "heating"
|
HEATING = "heating"
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
"default": "mdi:circle-medium",
|
"default": "mdi:circle-medium",
|
||||||
"state": {
|
"state": {
|
||||||
"cooling": "mdi:snowflake",
|
"cooling": "mdi:snowflake",
|
||||||
|
"defrosting": "mdi:snowflake-melt",
|
||||||
"drying": "mdi:water-percent",
|
"drying": "mdi:water-percent",
|
||||||
"fan": "mdi:fan",
|
"fan": "mdi:fan",
|
||||||
"heating": "mdi:fire",
|
"heating": "mdi:fire",
|
||||||
|
|
|
@ -69,13 +69,14 @@
|
||||||
"hvac_action": {
|
"hvac_action": {
|
||||||
"name": "Current action",
|
"name": "Current action",
|
||||||
"state": {
|
"state": {
|
||||||
"off": "[%key:common::state::off%]",
|
|
||||||
"preheating": "Preheating",
|
|
||||||
"heating": "Heating",
|
|
||||||
"cooling": "Cooling",
|
"cooling": "Cooling",
|
||||||
|
"defrosting": "Defrosting",
|
||||||
"drying": "Drying",
|
"drying": "Drying",
|
||||||
|
"fan": "Fan",
|
||||||
|
"heating": "Heating",
|
||||||
"idle": "[%key:common::state::idle%]",
|
"idle": "[%key:common::state::idle%]",
|
||||||
"fan": "Fan"
|
"off": "[%key:common::state::off%]",
|
||||||
|
"preheating": "Preheating"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hvac_modes": {
|
"hvac_modes": {
|
||||||
|
|
|
@ -1017,7 +1017,16 @@ async def test_handle_action_received(
|
||||||
|
|
||||||
# Cycle through valid modes
|
# Cycle through valid modes
|
||||||
# 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", "preheating", "heating", "cooling", "drying", "idle", "fan"]
|
actions = [
|
||||||
|
"off",
|
||||||
|
"preheating",
|
||||||
|
"defrosting",
|
||||||
|
"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