Skip to content

Commit 805d4e3

Browse files
gjohansson-STfrenckCopilot
authored
Remove battery properties from vacuum entity (#2695)
Co-authored-by: Franck Nijhof <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 77d0ea6 commit 805d4e3

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
author: G Johansson
3+
authorURL: https://github.com/gjohansson-ST
4+
authorImageURL: https://avatars.githubusercontent.com/u/62932417?v=4
5+
authorTwitter: GJohansson
6+
title: "Vacuum battery properties are deprecated"
7+
---
8+
9+
As of Home Assistant Core 2025.8, the two properties for battery in `StateVacuumEntity`, `battery_level` and `battery_icon`, have been deprecated.
10+
11+
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.
12+
Optionally consider to also provide a binary sensor with the `charging` device class if it's currently charging or not.
13+
14+
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.
15+
16+
More details can be found in the [architectural decision](https://github.com/home-assistant/architecture/discussions/938).

docs/core/entity/vacuum.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ Properties should always only return information from memory and not do I/O (lik
1313

1414
| Name | Type | Default | Description
1515
| ---- | ---- | ------- | -----------
16-
| battery_icon | string | function | Battery icon to show in UI.
17-
| battery_level | int | `none` | Current battery level.
1816
| fan_speed | string | `none` | The current fan speed.
1917
| fan_speed_list | list | `NotImplementedError()`| List of available fan speeds.
2018
| name | string | **Required** | Name of the entity.
@@ -42,7 +40,6 @@ must set the `VacuumEntityFeature.STATE` flag.
4240

4341
| Value | Description |
4442
| -------------- | ---------------------------------------------------- |
45-
| `BATTERY` | The vacuum supports retrieving battery status. |
4643
| `CLEAN_SPOT` | The vacuum supports spot cleaning. |
4744
| `FAN_SPEED` | The vacuum supports setting fan speed. |
4845
| `LOCATE` | The vacuum supports locating. |

0 commit comments

Comments
 (0)