2026.3.2 #418
Hankanman
announced in
Announcements
2026.3.2
#418
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Went on a Bug hunt 🐛
Bug Fixes
sync_statesran database queries on the event loop, causing UI lag. Refactored to run all DB operations in the executor and pre-compute entity-area mappings to avoid O(n×m) lookups. Fixes sync_states blocks the event loop with synchronous DB operations #388 in fix: Move sync_states DB operations to executor thread #403not entity.evidence) instead of identity check (entity.evidence is False), incorrectly treatingNone(unavailable) as inactive. Now correctly distinguishes unavailable from inactive entities. Fixes Unavailable entities incorrectly classified as inactive #389 in fix: Distinguish unavailable entities from inactive #404_cleanup_area_orphansanddelete_area_datadid not clean upIntervalAggregates,CrossAreaStats,NumericSamples, orNumericAggregates, leaving stale data after area removal. All tables are now scoped and cleaned. Fixes delete_area_data leaves orphaned records in multiple tables #390 in fix: Clean up all related tables on area/entity deletion #405load_datadid not verify that restored motion/sleep sensor entity IDs still had the correctInputType, allowing misclassified sensors to carry stale probabilities after reconfiguration. Added type guard validation. Fixes DB load overwrites motion sensor probabilities with stale values #391 in fix: Prevent DB load from overwriting motion/sleep sensor probabilities #406set_last_prune_timeopened a session but never committed, so the prune timestamp was lost on restart, causing redundant full-table prunes on every cycle. Consolidated into a single transaction with the prune deletes. Fixes prune_old_intervals never persists the last-prune timestamp #392 in fix: Persist last-prune timestamp after pruning intervals #407value is None) were still included in the probability calculation when decay was active, inflating occupancy probability. Now skipped regardless of decay. Fixes Unavailable + decaying entity treated as having positive evidence #394 in fix: Skip unavailable entities in Bayesian calculation regardless of decay #409combine_priorsunclamped early return — When only one area had data,combine_priorsreturned its raw prior without clamping, potentially producing values outside the 1–99% range. Now appliesclamp_probability()on all return paths. Fixes combine_priors early return bypasses probability clamping #395 in fix: Clamp probability in combine_priors early return path #410HomeAssistantError | OSError | RuntimeError, letting unexpected exceptions (e.g.,KeyError,TypeError) crash the coordinator. Broadened to catchExceptionwith full logging. Fixes Analysis pipeline _run_step catches only 3 exception types #396 in fix: Broaden exception handling in analysis pipeline steps #411"nan"string not filtered — Entities reporting the string"nan"as their state were treated as valid, producingNaNin probability calculations. Added"nan"to the invalid states filter. Fixes Lowercase "nan" state not filtered, silently treated as inactive #397 in fix: Filter lowercase nan in entity state property #412_async_lightweight_config_updatewould abort the entire update loop, leaving remaining areas with stale configuration. Each area is now wrapped in its own try/except. Fixes No exception handling in lightweight config update path #398 in fix: Add error handling to lightweight config update path #413contextlib.suppresson WAL checkpoint hid potentially actionable errors. Replaced with explicit try/except and warning-level logging withexc_info=True. Fixes Silent WAL checkpoint failure can produce incomplete backups #399 in fix: Log warning on WAL checkpoint failure during backup #414_area_config_draftbefore validating, so a validation failure left the draft in a partially-modified state. Now validates on a candidate copy first. Fixes Config flow draft corrupted before validation in area behavior step #400 in fix: Validate area behavior input before updating draft #415CONF_AREAStype safety —CONF_AREASwas assumed to be alist[dict]but could contain non-dict items after manual config edits or corruption. Added per-item type validation with warning logging. Fixes _get_areas_from_config has no type safety on CONF_AREAS value #401 in fix: Add type safety check for CONF_AREAS value #416AnalysisStatusraw strings — Analysis status was tracked with raw string literals ("idle","running", etc.), risking typo bugs and making refactoring fragile. Replaced withAnalysisStatusenum values throughout. Fixes create_from_config_spec uses raw strings instead of AnalysisStatus enum #402 in fix: Use AnalysisStatus enum instead of raw strings #417A big thank you to those who have chosen to sponsor my work!
You can sponsor me here
Full Changelog: 2026.3.1...2026.3.2
This discussion was created from the release 2026.3.2.
Beta Was this translation helpful? Give feedback.
All reactions