diff --git a/blog/2025-07-02-vacuum-battery-properties-deprecated.md b/blog/2025-07-02-vacuum-battery-properties-deprecated.md new file mode 100644 index 00000000..f3175ec0 --- /dev/null +++ b/blog/2025-07-02-vacuum-battery-properties-deprecated.md @@ -0,0 +1,16 @@ +--- +author: G Johansson +authorURL: https://github.com/gjohansson-ST +authorImageURL: https://avatars.githubusercontent.com/u/62932417?v=4 +authorTwitter: GJohansson +title: "Vacuum battery properties are deprecated" +--- + +As of Home Assistant Core 2025.8, the two properties for battery in `StateVacuumEntity`, `battery_level` and `battery_icon`, have been deprecated. + +The `battery_level` and `battery_icon` properties should be replaced by a separate sensor with the `battery` sensor device class and optionally a customized icon if the default icon of the battery sensor device class isn't wanted. +Optionally consider to also provide a binary sensor with the `charging` device class if it's currently charging or not. + +There is a one-year deprecation period, and the two battery properties will stop working from 2026.8 to ensure all custom integration authors have time to adjust. + +More details can be found in the [architectural decision](https://github.com/home-assistant/architecture/discussions/938). diff --git a/docs/core/entity/vacuum.md b/docs/core/entity/vacuum.md index ac581a49..7f818a6a 100644 --- a/docs/core/entity/vacuum.md +++ b/docs/core/entity/vacuum.md @@ -13,8 +13,6 @@ Properties should always only return information from memory and not do I/O (lik | Name | Type | Default | Description | ---- | ---- | ------- | ----------- -| battery_icon | string | function | Battery icon to show in UI. -| battery_level | int | `none` | Current battery level. | fan_speed | string | `none` | The current fan speed. | fan_speed_list | list | `NotImplementedError()`| List of available fan speeds. | name | string | **Required** | Name of the entity. @@ -42,7 +40,6 @@ must set the `VacuumEntityFeature.STATE` flag. | Value | Description | | -------------- | ---------------------------------------------------- | -| `BATTERY` | The vacuum supports retrieving battery status. | | `CLEAN_SPOT` | The vacuum supports spot cleaning. | | `FAN_SPEED` | The vacuum supports setting fan speed. | | `LOCATE` | The vacuum supports locating. |