Skip to content

v0.9.24 - Fix battery entity unavailability after transient read failure

Choose a tag to compare

@btli btli released this 03 Mar 01:50
· 57 commits to main since this release
0599bcd

Bug Fixes

Fixed: Individual battery entities becoming unavailable after transient WiFi dongle errors (#180)

Root cause: When reading individual battery registers (5002–5121) failed (e.g., WiFi dongle disconnect, timeout, CRC error), _battery_slot_ceiling was permanently set to 0. All subsequent polls skipped the read entirely (batteries_to_read = min(4, 0) = 0), causing all individual battery entities to go unavailable until HA was reloaded.

Fix: Removed the permanent-disable mechanism. Failed reads now return None for the current poll cycle and automatically retry on the next poll — consistent with how all other register reads behave. No persistent state is set after a failure.

Changed

  • _read_individual_battery_registers(): Removed _battery_slot_ceiling attribute. The batteries_to_read cap is now always min(battery_count, BATTERY_MAX_COUNT).
  • Warning log updated from "Battery slot ceiling lowered to 0" to "will retry next poll"