Skip to content

v0.2.0

Choose a tag to compare

@BrendanAnnable BrendanAnnable released this 31 Jan 03:11
f579da9

v0.2.0 Release Notes

Highlights

  • Smarter polling - Probabilistic polling learns when Amber confirms prices to reduce confirmation lag
  • 📊 HAEO compatibility - Price sensors now set interpolation_mode: previous for correct price processing (Requires HAEO >= v0.3.0)
  • 🔍 New diagnostic sensors - Monitor rate limits, next poll time, and confirmation lag

User-Facing Changes

New Features

  • Smart polling strategy - The integration now uses a CDF-based algorithm that learns when Amber typically confirms prices, reducing confirmation lag while staying within rate limits (#15)
  • Interpolation mode - Price sensors now set interpolation_mode: previous so HAEO and other tools can process prices without interpolating between intervals (#21)
  • Confirmation lag sensor - New sensor showing the time gap between receiving an estimate and receiving the confirmed price (#14)
  • Diagnostic sensors (disabled by default) - New sensors for monitoring integration health (#22):
    • Rate limit remaining (requests)
    • Rate limit reset time
    • Next poll time (with schedule in attributes)

Improvements

  • Persistent observations - Polling observations are now stored and persist across Home Assistant restarts (#23)
  • Reliable forecasts - Forecasts are now always fetched with prices to ensure data consistency (#16)
  • Improved logging - Poll schedule now logged at debug level for easier troubleshooting (#19)
  • Price precision - Prices now rounded to 1/100th of a cent

Developer-Facing Changes

Developer Highlights

This release introduces a significant architectural improvement with the CDF (Cumulative Distribution Function) polling system. The system learns from historical observations when Amber typically confirms prices and optimally schedules polls to minimize confirmation lag while respecting rate limits.

Architecture

  • New modules:
    • smart_polling.py - Polling manager coordinating interval state and poll decisions
    • cdf_polling.py - CDF-based strategy calculating optimal poll schedules
    • cdf_algorithm.py - Core CDF math and optimal poll point calculations
    • cdf_cold_start.py - Bootstrap data for new installations
    • cdf_storage.py - Persistent storage for CDF observations
  • API client refactor - Config flow now uses the shared AmberApiClient with proper rate limiting
  • Comprehensive test coverage - New test suites for CDF algorithm, smart polling, and polling offset calculations

Contributors

Full Changelog

Full Changelog: v0.1.4...v0.2.0