hass.tibber_prices/custom_components/tibber_prices/services
Julian Pawlowski c9a7dcdae7 feat(services): add rolling window options with auto-zoom for ApexCharts
Added two new rolling window options for get_apexcharts_yaml service to provide
flexible dynamic chart visualization:

- rolling_window: Fixed 48h window that automatically shifts between
  yesterday+today and today+tomorrow based on data availability
- rolling_window_autozoom: Same as rolling_window but with progressive zoom-in
  (2h lookback + remaining time until midnight, updates every 15min)

Implementation changes:
- Updated service schema validation to accept new day options
- Added entity mapping patterns for both rolling modes
- Implemented minute-based graph_span calculation with quarter-hour alignment
- Added config-template-card integration for dynamic span updates
- Used current_interval_price sensor as 15-minute update trigger
- Unified data loading: both rolling modes omit day parameter for dynamic selection
- Applied ternary operator pattern for cleaner day_param logic
- Made grid lines more subtle (borderColor #f5f5f5, strokeDashArray 0)

Translation updates:
- Added selector options in all 5 languages (de, en, nb, nl, sv)
- Updated field descriptions to include default behavior and new options
- Documented that rolling window is default when day parameter omitted

Documentation updates:
- Updated user docs (actions.md, automation-examples.md) with new options
- Added detailed explanation of day parameter options
- Included examples for both rolling_window and rolling_window_autozoom modes

Impact: Users can now create auto-adapting ApexCharts that show 48h rolling
windows with optional progressive zoom throughout the day. Requires
config-template-card for dynamic behavior.
2025-12-04 14:39:00 +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 fix(services): correct period data format for ApexCharts visualization 2025-12-03 14:20:46 +00:00
get_apexcharts_yaml.py feat(services): add rolling window options with auto-zoom for ApexCharts 2025-12-04 14:39:00 +00:00
get_chartdata.py fix(services): correct period data format for ApexCharts visualization 2025-12-03 14:20:46 +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