github andrew-codechimp/HA-Battery-Notes 3.7.1

pre-release3 hours ago

What's Changed

Battery Notes launched over 3 years ago, for those that used it back then it had the battery type and quantity and that was it!
A lot has changed since then, I was an inexperienced integration developer so it was very scrappy, but those early adopters saw potential and kept driving features which I'm very grateful for. This release is a big tidy-up; some of those features didn't interact well with others introducing very subtle bugs.

Huge thanks to @mrueg who was the main driver for investigating/providing fixes for the majority of these, I groaned at each of the little niche bug came in and decided I need to guard against this happening in future. I now have a testing framework with currently 93% coverage to try and prevent regressions emerging in the future.

⚠️ Breaking Changes

  • Sensors that used to show unknown in some cases now show unavailable for consistency with Home Assistant, if you checked on unknown state only you will need to update your automations/dashboard logic.

🚀 Features

  • Add note to all event data by @andrew-codechimp in #5227
  • Improved diagnostic data - now includes each battery note state should an issue need investigation.

🔧 Internal Changes

  • Use live battery units when registry metadata is missing, improving battery detection by @SeoFood in #5175
  • 447 tests added to guard against future regressions.
  • Create tests in HA standard pattern and mark some as legacy by @andrew-codechimp in #5187
  • Add tests for battery events and check services by @mrueg in #5189
  • Remove unused platform schemas and constants by @mrueg in #5191
  • Build event payloads and service responses in one place by @mrueg in #5193
  • Change loops to use get_subentries_of_type by @andrew-codechimp in #5205
  • Make library loading and updates more robust by @mrueg in #5208
  • Refactor tests: remove legacy tests, update test commands, and enhanc… by @andrew-codechimp in #5224
  • Remove duplicated code from the config flow by @mrueg in #5216
  • Share template tracking between the template sensors by @mrueg in #5217
  • Read integration options from the entry's runtime data in entities by @mrueg in #5215

🐛 Bug Fixes

  • Fix library updater timer leak and library loading issues by @mrueg in #5179
  • Skip library download on config entry reloads by @mrueg in #5181
  • Add logic to control library download on config entry reload by @andrew-codechimp in #5183
  • Fix service calls failing with orphaned battery notes by @mrueg in #5178
  • Fix config flow, repairs and removal issues by @mrueg in #5180
  • Fix stuck unavailable sensors and leaking listeners by @mrueg in #5177
  • Fix battery level event handling in the coordinator by @mrueg in #5176
  • Batch storage writes for last reported updates by @mrueg in #5182
  • Remove unused errors module by @mrueg in #5186
  • Show hidden source batteries when the integration is removed by @mrueg in #5185
  • Make entities unavailable when their source is unavailable by @mrueg in #5190
  • Fix service field translation keys by @mrueg in #5196
  • Initialise orphaned battery note coordinators by @mrueg in #5192
  • Fix setup failing after clearing the user library option by @mrueg in #5195
  • Show the hidden source battery low sensor when removing a note by @mrueg in #5197
  • Use the device's area for entity notes without their own area by @mrueg in #5199
  • Only wrap binary sensors as the battery low source by @mrueg in #5200
  • Prefer the device note when replacing a battery by device by @mrueg in #5203
  • Use the device's primary config entry in discovery pre HA 2026.9 by @mrueg in #5201
  • Send levels matching the direction of binary battery low events by @mrueg in #5202
  • Fix outlier filter rejecting real 0% and accepting repeated outliers by @mrueg in #5204
  • Don't treat an unavailable battery low template source as not low by @mrueg in #5209
  • Honour retain state for percentage template notes by @mrueg in #5210
  • Fix the battery report throttle for fractional levels by @mrueg in #5211
  • Fix composite device repair for entity notes and double reload by @mrueg in #5214
  • Split version 1 battery types when migrating to subentries by @mrueg in #5212
  • Load storage with unknown or missing fields by @mrueg in #5213

❤️ Thanks for the huge amount of support shown, if you would like to show your support please

Full Changelog: 3.7.0...3.7.1

Don't miss a new HA-Battery-Notes release

NewReleases is sending notifications on new releases.