The groundwork is in place for this to be handled by the UI in the future. In 2022.4 (maybe 5), a new sensor device class duration was added. As long as a sensor has the following things set:
- Has a value of hours, minutes, or seconds
- Corresponding unit_of_measurement,
The UI will display the value as
d HH:MM:SS. Where d is days, HH is hours, MM is minutes and SS is seconds.
In the future, I could see a setting in the UI being added for the display on a duration sensor.
To add this functionality to the vacuum sensors, just manually customize the entity with
Also, you should open an issue against the integration that’s creating those entities, as they should be setting the duration device class.