v1.2.0 - Level 2: Players, Scores & Metadata
v1.2.0 - Level 2: Players, Scores & Metadata
This beta release marks a major architectural improvement for the BGG Sync integration, migrating the core network layer to be fully asynchronous. This ensures better stability, performance, and compliance with Home Assistant's architectural standards.
🚀 Key Changes
- Last Sync Sensor: Added a diagnostic sensor (
bgg_last_sync) to track the timestamp of the last successful data fetch. - Force Sync Button: Added a diagnostic button to force a BGG sync.
- Plays Sensor Attributes: The
last_playattribute is now "flattened" into top-level attributes on the Plays sensor:gamebgg_iddatecomment(Cleaned of BBCode)expansions(Extracted from comment text)winnersplayersimage(Fetched from game metadata if available)- NOTE: The original nested
last_playattribute dictionary has been removed.
- String Localization: Added friendly localised names for the services.
- Player Details in Recording: The
record_playservice now supports passing player names and winners to BoardGameGeek.
Fixed
- Clean Attribute Text: Fixed issue where BGG BBCode tags (e.g.
[thing=...]) were appearing in sensor attributes (last play comments). - Cleaned Up: Improved code comments and removed unused imports.
- Service Stability: Moved blocking legacy recording logic into an executor job to maintain Home Assistant performance standards while ensuring session persistence.
Async Migration
- Performance: Switched all network I/O from the blocking
requestslibrary toaiohttp. This prevents the integration from blocking the Home Assistant event loop during API calls, which is critical for system stability. - Dependency Cleanup: Removed the hard dependency on
requests, making the integration lighter. - Modernisation: Updated all service calls and sensor updates to fully utilise proper
async/awaitpatterns.
🛠️ Technical Improvements
Test Suite Overhaul
- Thread Safety: Completely refactored the test suite to use isolated
AsyncMockpatterns for client sessions. This permanently resolves the "Lingering Thread" errors that were plaguing the test suite. - Mocking: Removed
aioclient_mockin favour of pure Python mocks for granular control over connection behaviour in tests. - Stability: The test suite passes 100% cleanly (55 tests) with no warnings or errors.
Code Quality
- Assertions: Fixed logic assertions in configuration flow to accurately reflect error handling behaviours.