Major Refactor & Manual Ski Area Support
This release introduces a significant overhaul of the Bergfex integration, focusing on improved efficiency, enhanced functionality with manual ski area configuration, and increased robustness.
Features
- Manual Ski Area Configuration [#1]: You can now add ski areas that are not in the predefined list by manually entering their URL path during configuration (e.g.,
lelex-crozet). This provides much greater flexibility, allowing you to track any resort available on Bergfex. - Translation Support: Full translation support has been added for English and German, covering new configuration options, descriptions, and error messages for a more localized user experience.
Improvements & Optimizations
- Efficient Data Fetching: The integration now fetches data for an entire country in a single request, significantly reducing the number of calls to the Bergfex website and speeding up data refreshes. A separate coordinator is intelligently used as a fallback for manually added resorts not part of the main country overview.
- Enhanced Parsing & Robustness: The HTML parsing logic has been extracted into a dedicated, more robust module and now leverages the faster
lxmllibrary. This includes a new parser specifically designed to handle individual resort pages for manually configured ski areas. - Reliable Naming & Identification: Device and entity naming is now more consistent and stable. Unique identifiers are now based on the resort's URL path, ensuring stability even if display names change.
Internal Changes
- Added comprehensive unit tests for the new resort page parser to ensure data accuracy.
- Updated dependencies in
manifest.jsonto includelxml. - Cleaned up old test files and introduced new test fixtures for improved test coverage.