mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-30 05:13:40 +00:00
Return shallow copies from _get_cached_intervals() to prevent external code (e.g., parse_all_timestamps()) from mutating Pool internal cache. This fixes TypeError in check_coverage() caused by datetime objects in cached interval dicts. Additional improvements: - Add TimeService support for time-travel testing in cache/manager - Normalize startsAt to consistent format (handles datetime vs string) - Rename detect_gaps() → check_coverage() for clarity - Add get_sensor_data() for sensor data fetching with fetch/return separation - Add get_pool_stats() for lifecycle sensor metrics Impact: Fixes critical cache mutation bug, enables time-travel testing, improves pool API for sensor integration. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| cache.py | ||
| fetcher.py | ||
| garbage_collector.py | ||
| index.py | ||
| manager.py | ||
| routing.py | ||
| storage.py | ||