New ClimateEntityFeature for turn on turn off (#2053)

This commit is contained in:
G Johansson 2024-01-30 15:10:47 +01:00 committed by GitHub
parent e11058f0ad
commit 9a7890b5f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,14 @@
---
author: G Johansson
authorURL: https://github.com/gjohansson-ST
title: "New entity features in Climate entity"
---
As of Home Assistant Core 2024.2 we have added two new flags into `ClimateEntityFeature`: `TURN_ON`, `TURN_OFF`.
Integrations implementing `turn_on` service call needs to set the `TURN_ON` feature flag.
Integrations implementing `turn_off` service call needs to set the `TURN_OFF` feature flag.
There will be a 10 month deprecation period (2025.1) where `ClimateEntity` will set these on behalf of the integrations implementing the respective methods and from 2025.1 it will make integrations unable to use the respective methods if entity features has not been set accordingly.
Implementing the methods without setting the respective feature flag will create a warning log entry guiding the user to create an issue for the integration.

View File

@ -123,6 +123,8 @@ and are combined using the bitwise or (`|`) operator.
| `PRESET_MODE` | The device supports presets. |
| `SWING_MODE` | The device supports swing modes. |
| `AUX_HEAT` | The device supports auxiliary heaters. |
| `TURN_ON` | The device supports turn on. |
| `TURN_OFF` | The device supports turn off. |
## Methods