denysdovhan / vacuum-card

Vacuum cleaner card for Home Assistant Lovelace UI
https://denysdovhan.com/smart-home
MIT License
904 stars 529 forks source link

Incorrect battery status #669

Open almirus opened 9 months ago

almirus commented 9 months ago

Before submitting a bug

[X ] I updated to the latest version available [ X] I cleared the cache of my browser

Describe the bug

Empty battery status in main screen image

Steps to reproduce

  1. Add widget

Expected behavior In the main widget, the battery level is not displayed, but if you click it, the battery level is displayed in the second window.

Screenshots image

Versions:

STATES ``` button.neatsvor_x600_empty_dustbin Neatsvor X600 Empty dustbin unknown icon: mdi:delete-restore friendly_name: Neatsvor X600 Empty dustbin button.neatsvor_x600_filter_reset Neatsvor X600 Filter reset unknown icon: mdi:autorenew friendly_name: Neatsvor X600 Filter reset button.neatsvor_x600_main_brush_reset Neatsvor X600 Main brush reset unknown icon: mdi:autorenew friendly_name: Neatsvor X600 Main brush reset button.neatsvor_x600_mop_reset Neatsvor X600 Mop reset unknown icon: mdi:autorenew friendly_name: Neatsvor X600 Mop reset button.neatsvor_x600_side_brush_reset Neatsvor X600 Side brush reset unknown icon: mdi:autorenew friendly_name: Neatsvor X600 Side brush reset number.neatsvor_x600_volume Neatsvor X600 Volume 7 min: 0 max: 10 step: 1 mode: auto icon: mdi:volume-high friendly_name: Neatsvor X600 Volume select.neatsvor_x600_dust_collection_frequency Neatsvor X600 Dust collection frequency After 3 cleans options: Never, After each clean, After 2 cleans, After 3 cleans icon: mdi:numeric-3 friendly_name: Neatsvor X600 Dust collection frequency select.neatsvor_x600_water_setting Neatsvor X600 Water setting Off options: Off, Low, Medium, High icon: mdi:water friendly_name: Neatsvor X600 Water setting sensor.neatsvor_x600_batareia Neatsvor X600 Батарея 100 state_class: measurement unit_of_measurement: % device_class: battery friendly_name: Neatsvor X600 Батарея sensor.neatsvor_x600_cleaned_area Neatsvor X600 Cleaned area 25 unit_of_measurement: m² icon: mdi:vector-square-close friendly_name: Neatsvor X600 Cleaned area sensor.neatsvor_x600_cleaning_time Neatsvor X600 Cleaning time 23 unit_of_measurement: min device_class: duration icon: mdi:timer-star friendly_name: Neatsvor X600 Cleaning time sensor.neatsvor_x600_filter_life Neatsvor X600 Filter life 98 unit_of_measurement: min device_class: duration icon: mdi:timer-sand friendly_name: Neatsvor X600 Filter life sensor.neatsvor_x600_main_brush_life Neatsvor X600 Main brush life 248 unit_of_measurement: min device_class: duration icon: mdi:timer-sand friendly_name: Neatsvor X600 Main brush life sensor.neatsvor_x600_mop_life Neatsvor X600 Mop life 134 unit_of_measurement: min device_class: duration icon: mdi:timer-sand friendly_name: Neatsvor X600 Mop life sensor.neatsvor_x600_side_brush_life Neatsvor X600 Side brush life 148 unit_of_measurement: min device_class: duration icon: mdi:timer-sand friendly_name: Neatsvor X600 Side brush life vacuum.neatsvor_x600 Neatsvor X600 docked fan_speed_list: Off, Gentle, Normal, Strong fan_speed: Normal activate: true command: return_to_base status: charged error: 0 friendly_name: Neatsvor X600 supported_features: 14260 ```
make-all commented 8 months ago

I think this is caused by Home Assistant deprecating the battery_level attribute of the vacuum entity last July, and instead instructing integration authors to replace it with a sensor of class battery connected to the same device. https://developers.home-assistant.io/blog/2023/07/10/vacuum-updates

But many integrations have not been updated, so I don't know if this can be implemented conditionally to show the battery from battery_level if available, otherwise using the linked battery sensor..

shad0wca7 commented 7 months ago

Is there a way to hide the % in the top left or replace it with something else?

antonio1475 commented 7 months ago

Also having this issue.

It's probably an easy change on this section of the card https://github.com/denysdovhan/vacuum-card/blob/fb081d31dd7c82ec173d65e2bf0529308c71112c/src/vacuum-card.ts#L221

but I don't have the knowledge 😓

joeblackdandt commented 5 months ago

Also seeing this issue: image

github-actions[bot] commented 3 months ago

There hasn't been any activity on this issue recently. This issue has now been marked as stale and will be closed if no further activity occurs. Please, update to the latest version and check if that solves the issue. Thank you for your contributions!

make-all commented 3 months ago

Problem still exists in latest version with vacuums integrations that have been modified to follow https://developers.home-assistant.io/blog/2023/07/10/vacuum-updates

slashbv commented 2 months ago

same problem here

make-all commented 1 month ago

I think this requires something similar to the findBatteryEntity implementation from homeassistant/frontend (maybe you can import that and use it directly)

https://github.com/home-assistant/frontend/blob/7a6491a901ade1ed5069f2d26ac9a48c05cf4385/src/dialogs/more-info/controls/more-info-vacuum.ts#L229