Closed sg26565 closed 1 month ago
the device_class of the sensor.battery_percentage object reported is "diagnostic" and not "battery" as in the official integration which prevents the icon from changing depending on the battery level
I think that if the device_class is battery and not diagnostic the correct icon will come up depending on the value of the battery percentage as in the original add-on.
to complete my reply, all battery level coming from any device are sensors , so I don't really understand the #44 request
The abttery % are updated and now are dynamic please do test and let me know will close the issue. Please re-open if it doesnt work
From what I see in the code, the battery percentage is loaded from the hub when the entries are initialized in sensors.async_setup_entry(). Afterwards, it seems the value is never updated, because the battery percentage is not part of the normal event data. Would it make sense to re-fetch the data via hub.get_xxx_sensors() regularly (e.g. every hour)?