hass.tibber_prices/custom_components/tibber_prices/interval_pool
Julian Pawlowski 7adc56bf79 fix(interval_pool): prevent external mutation of cached intervals
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.
2025-12-23 14:13:24 +00:00
..
__init__.py feat(interval-pool): add intelligent interval caching and memory optimization 2025-11-25 20:44:39 +00:00
cache.py fix(interval_pool): prevent external mutation of cached intervals 2025-12-23 14:13:24 +00:00
fetcher.py fix(interval_pool): prevent external mutation of cached intervals 2025-12-23 14:13:24 +00:00
garbage_collector.py fix(interval_pool): prevent external mutation of cached intervals 2025-12-23 14:13:24 +00:00
index.py refactor(interval_pool): improve reliability and test coverage 2025-12-23 10:10:35 +00:00
manager.py fix(interval_pool): prevent external mutation of cached intervals 2025-12-23 14:13:24 +00:00
routing.py feat(interval-pool): add intelligent interval caching and memory optimization 2025-11-25 20:44:39 +00:00
storage.py feat(interval-pool): add intelligent interval caching and memory optimization 2025-11-25 20:44:39 +00:00