Add two new service actions for intelligent device scheduling:
- find_best_start: Find optimal start time for run-once appliances
- Considers price, optional energy estimates, optional PV power
- Supports flexible time windows (HH:MM, ISO datetime, with/without timezone)
- Prefers future candidates over past ones
- Includes current interval by default (configurable)
- Returns recommended start time with cost analysis
- plan_charging: Create optimized charging schedule for energy storage
- Supports EV, home battery, balcony battery use cases
- Energy target or duration-based planning
- Split or continuous charging modes
- Efficiency factor support
- Includes current interval by default (configurable)
- Returns detailed slot-by-slot charging plan
Common improvements:
- Flexible datetime parsing (ISO 8601, with/without timezone, microseconds)
- Time selector in GUI (better UX than text field)
- Currency display based on config entry settings
- Comprehensive error handling and validation
- Detailed response envelopes with warnings/errors
Impact: Users can automate appliance scheduling based on electricity
prices without external automation rules.
Add debug service to clear tomorrow data from interval pool, enabling
testing of tomorrow data refresh cycle without waiting for next day.
Service available only in DevContainer (TIBBER_PRICES_DEV=1 env var).
Removes intervals from both Pool index and coordinator.data["priceInfo"]
so sensors properly show "unknown" state.
Changes:
- Add debug_clear_tomorrow.py service handler
- Register conditionally based on TIBBER_PRICES_DEV env var
- Add service schema and translations
- Set TIBBER_PRICES_DEV=1 in devcontainer.json
Usage: Developer Tools → Services → tibber_prices.debug_clear_tomorrow
Impact: Enables rapid testing of tomorrow data refresh cycle during
development without waiting or restarting HA.
Added new service for fetching historical/future price data:
- fetch_price_info_range: Query prices for arbitrary date ranges
- Supports start_time and end_time parameters
- Returns structured price data via service response
- Uses interval pool for efficient data retrieval
Service definition:
- services.yaml: Added fetch_price_info_range with date selectors
- services/__init__.py: Implemented handler with validation
- Response format: {"priceInfo": [...], "currency": "..."}
Schema updates:
- config_flow_handlers/schemas.py: Convert days slider to IntSelector
(was NumberSelector with float, caused "2.0 Tage" display issue)
Impact: Users can fetch price data for custom date ranges programmatically.
Config flow displays clean integer values for day offsets.