hass.tibber_prices/custom_components/tibber_prices/services
Julian Pawlowski 23b4330b9a fix(coordinator): track API calls separately from cached data usage
The lifecycle sensor was always showing "fresh" state because
_last_price_update was set on every coordinator update, regardless of
whether data came from API or cache.

Changes:
- interval_pool/manager.py: get_intervals() and get_sensor_data() now
  return tuple[data, bool] where bool indicates actual API call
- coordinator/price_data_manager.py: All fetch methods propagate
  api_called flag through the call chain
- coordinator/core.py: Only update _last_price_update when api_called=True,
  added debug logging to distinguish API calls from cached data
- services/get_price.py: Updated to handle new tuple return type

Impact: Lifecycle sensor now correctly shows "cached" during normal
15-minute updates (using pool cache) and only "fresh" within 5 minutes
of actual API calls. This fixes the issue where the sensor would never
leave the "fresh" state during frequent HA restarts or normal operation.
2025-12-25 18:53:29 +00:00
..
__init__.py feat(services): add debug_clear_tomorrow for testing refresh cycle 2025-12-23 14:13:51 +00:00
debug_clear_tomorrow.py feat(services): add debug_clear_tomorrow for testing refresh cycle 2025-12-23 14:13:51 +00:00
formatters.py fix: support main and subunit currency 2025-12-11 23:07:06 +00:00
get_apexcharts_yaml.py fix(apexcharts): synchronize y-axis tick intervals for consistent grid alignment 2025-12-21 17:39:12 +00:00
get_chartdata.py fix(chartdata): use proportional padding for yaxis bounds 2025-12-22 23:39:35 +00:00
get_price.py fix(coordinator): track API calls separately from cached data usage 2025-12-25 18:53:29 +00:00
helpers.py feat(services): add rolling 48h window support to chart services 2025-12-01 23:46:09 +00:00
refresh_user_data.py refactor(services): split monolithic services.py into package 2025-11-18 20:07:05 +00:00