mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-30 05:13:40 +00:00
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. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| formatters.py | ||
| get_apexcharts_yaml.py | ||
| get_chartdata.py | ||
| get_price.py | ||
| helpers.py | ||
| refresh_user_data.py | ||