mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-04-19 10:57:14 +00:00
Add defrosting to climate entity (#2240)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
1d2df8b0e7
commit
f65f3fef94
27
blog/2024-07-07-climate-hvacaction-defrosting.md
Normal file
27
blog/2024-07-07-climate-hvacaction-defrosting.md
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
author: G Johansson
|
||||
authorURL: https://github.com/gjohansson-ST
|
||||
title: "New HVACAction DEFROSTING"
|
||||
---
|
||||
|
||||
The `ClimateEntity` has an `hvac_action` property, which describes what the climate entity is currently doing (which is not the same as its mode).
|
||||
|
||||
We have added `DEFROSTING` as a possible `HVACAction` to represent when an entity is currently defrosting.
|
||||
|
||||
Defrosting is when the system runs in reverse for some time to melt down accumulated ice. It occurs typically in colder environments and should not be mixed with, for example, cars that are defrosting by heating their windows.
|
||||
|
||||
```python
|
||||
from homeassistant.components.climate.const import HVACAction
|
||||
|
||||
class MyClimateEntity(ClimateEntity):
|
||||
"""Implementation of my climate entity."""
|
||||
|
||||
def hvac_action(self) -> HVACAction | None:
|
||||
"""Return the current running hvac operation if supported."""
|
||||
return HVACAction.DEFROSTING
|
||||
|
||||
```
|
||||
|
||||
More details can be found in the [climate entity documentation](/docs/core/entity/climate#hvac-action)
|
||||
|
||||
Background for the original change is in [architecture discussion #1090](https://github.com/home-assistant/architecture/discussions/1090).
|
@ -65,6 +65,7 @@ The HVAC action describes the _current_ action. This is different from the mode,
|
||||
| `HVACAction.DRYING` | Device is drying. |
|
||||
| `HVACAction.FAN` | Device has fan on. |
|
||||
| `HVACAction.IDLE` | Device is idle. |
|
||||
| `HVACAction.DEFROSTING` | Device is defrosting. |
|
||||
|
||||
### Presets
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user