hass.tibber_prices/custom_components/tibber_prices/services
Julian Pawlowski e156dfb061 feat(services): add rolling 48h window support to chart services
Add dynamic rolling window mode to get_chartdata and get_apexcharts_yaml
services that automatically adapts to data availability.

When 'day' parameter is omitted, services return 48-hour window:
- With tomorrow data (after ~13:00): today + tomorrow
- Without tomorrow data: yesterday + today

Changes:
- Implement rolling window logic in get_chartdata using has_tomorrow_data()
- Generate config-template-card wrapper in get_apexcharts_yaml for dynamic
  ApexCharts span.offset based on tomorrow_data_available binary sensor
- Update service descriptions in services.yaml
- Add rolling window descriptions to all translations (de, en, nb, nl, sv)
- Document rolling window mode in docs/user/services.md
- Add ApexCharts examples with prerequisites in docs/user/automation-examples.md

BREAKING CHANGE: get_apexcharts_yaml rolling window mode requires
config-template-card in addition to apexcharts-card for dynamic offset
calculation.

Impact: Users can create auto-adapting 48h price charts without manual day
selection. Fixed day views (day: today/yesterday/tomorrow) still work with
apexcharts-card only.
2025-12-01 23:46:09 +00:00
..
__init__.py feat(services): add fetch_price_info_range service and update schema 2025-11-25 20:44:39 +00:00
formatters.py refactor(formatters, get_chartdata): serialize datetime objects to ISO format in data points 2025-11-30 15:07:18 +00:00
get_apexcharts_yaml.py feat(services): add rolling 48h window support to chart services 2025-12-01 23:46:09 +00:00
get_chartdata.py feat(services): add rolling 48h window support to chart services 2025-12-01 23:46:09 +00:00
get_price.py refactor(services): rename service modules to match service names 2025-11-25 20:44:39 +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