v1.2.2 - Fix Game Images
v1.2.2 - Image Fix
🚀 New Features
- Local Image Caching: Game artwork is now automatically downloaded and cached locally on your Home Assistant instance (
/config/www/bgg_images/). This serves images significantly faster and resolves issues where BGG images would occasionally fail to load or display due to hotlinking protections or whitespace errors. - Image Optimisation: Cached images are now automatically resized to a maximum of 500x500 pixels. This drastically reduces memory usage and dashboard load times, preventing crashes when displaying large collections.
- Enhanced Custom Images: When you set a
custom_image, it is now handled by the new caching system. This ensures your custom art is reliably displayed and persisted locally, correcting previous display glitches. - Australian Localisation: Updated the record_play service to accept
colourin addition tocolorfor player details, allowing for correct Australian/British spelling.
🐛 Bug Fixes
- Fix Image Loading: Resolved an issue where BGG API responses containing whitespace would break image URLs, causing broken images in the dashboard.
- Todo List Naming: Fixed a naming bug that resulted in the Todo list entity having a duplicate name (e.g., "User's Shelf Shelf"). It now correctly displays as "User's Shelf".
- Sensor Availability: Fixed a critical bug where sensors for games tracked via service calls (but not in the BGG collection) would become "Unavailable" after a configuration update or restart.
- Attribute Persistence: Fixed an issue where custom attributes (NFC tags, Music links, Custom Images) for tracked games were lost upon integration reload.
v1.2.1 - Minor Improvement
Updated the device name to use just the BGG username.
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:- game
bgg_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_play service 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 requests library to
aiohttp. 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.