Skip to content

2025.12.4

Choose a tag to compare

@Hankanman Hankanman released this 29 Dec 14:32

This version stabilizes the timezone normalization changes introduced in the pre-releases and includes several important improvements:

  • Improved timezone handling ensures accurate occupancy detection across different time zones, fixing issues with timestamp normalization that could affect data accuracy. All datetime operations now consistently use UTC internally with proper conversion to local time for display and analysis. Fixes #308, #301
  • Enhanced migration logic prevents unnecessary migrations for fresh installations, making setup smoother for new users. The migration system now intelligently detects fresh entries with the new format (CONF_AREAS) and skips migration steps that aren't needed, preventing false migration triggers. Fixes #306
  • Added support for additional sensor types including VOLATILE_ORGANIC_COMPOUNDS_PARTS, expanding the range of environmental sensors that can be used for occupancy detection. Fixes #305
  • Improved interval caching with validation and deduplication for better performance and reliability. Invalid intervals (where start time is greater than end time) are now automatically skipped, and duplicate intervals are prevented from being stored. Fixes #301
  • Updated user interface text and descriptions for clearer configuration options, making it easier to understand door and wasp-in-box sensor settings. Thank you @simon5738
  • Updated state monitoring to allow unavailable or unknown entities to be picked up when they become available. Fixes #310, #285
  • Refactored binary sensor state mapping to improve consistency and maintainability across the integration. The mapping logic has been extracted to a centralized utility function (map_binary_state_to_semantic) that converts binary sensor states ('on'/'off') to semantic states ('open'/'closed') based on active states. #299

‼️Potential Breaking Changes

The following applies if you are upgrading from a version before 2025.12.4.

Caution

Database Reset Required: This version includes fundamental changes to how timestamps are handled throughout the integration. The database schema version has been incremented (CONF_VERSION 15 → 16) to support timezone normalization and local bucketing. Your area_occupancy.db file will be automatically deleted and recreated with the new schema. All historical data (intervals, priors, correlations) will be cleared and will need to be rebuilt from Home Assistant's Recorder history.

Note

The database reset is necessary because the new timezone normalization system requires consistent UTC storage with proper timezone-aware datetime handling. Existing data stored with the old timestamp format cannot be safely migrated. The integration will automatically rebuild historical data from your Home Assistant Recorder over the next few hours/days.

Warning

If you rely on historical occupancy data for automations or analysis, be aware that this data will be lost during the upgrade. The integration will rebuild this data automatically, but it may take some time depending on how much history is available in your Recorder.

What's Changed

  • Implement timezone normalization and local bucketing utilities by @Hankanman in #304
  • Update version to 2025.12.4-pre2 and dependencies in project files by @Hankanman in #314
  • Improving user interface text by @simon5738 in #307
  • Add validation and deduplication for occupied interval caching by @Hankanman in #316
  • Extract binary sensor state mapping utility to utils.py by @Hankanman in #317
  • Bump pre-commit from 4.5.0 to 4.5.1 in the all-pip-dependencies group across 1 directory by @dependabot[bot] in #315
  • Bump actions/upload-artifact from 5 to 6 in the all-github-actions group by @dependabot[bot] in #309
  • Add support for VOLATILE_ORGANIC_COMPOUNDS_PARTS by @Hankanman in #318
  • Fix issue where new entries named wrong by @Hankanman in #320
  • Update versioning for Area Occupancy Detection integration by @Hankanman in #321
  • Refactor timezone handling with UTC storage by @Hankanman in #322

New Contributors

Full Changelog: 2025.12.3...2025.12.4