mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-29 21:03:40 +00:00
Fixes configuration wizard not saving settings (#59): Root cause was twofold: 1. Linear multi-step flow pattern didn't properly persist changes between steps 2. Best/peak price settings used nested sections format - values were saved in sections (period_settings, flexibility_settings, etc.) but read from flat structure, causing configured values to be ignored on subsequent runs Solution: - Replaced linear step-through flow with menu-based navigation system - Each configuration area now has dedicated "Save & Back" buttons - Removed nested sections from all steps except best/peak price (where they provide better UX for grouping related settings) - Fixed best/peak price steps to correctly extract values from sections: period_settings, flexibility_settings, relaxation_and_target_periods - Added reset-to-defaults functionality with confirmation dialog UI/UX improvements: - Menu structure: General Settings, Currency Display, Price Rating Thresholds, Volatility, Best Price Period, Peak Price Period, Price Trend, Chart Data Export, Reset to Defaults, Back - Removed confusing step progress indicators ("{step_num} / {total_steps}") - Changed all submit buttons from "Continue →" to "↩ Save & Back" - Clear grouping of settings by functional area Translation updates (nl.json + sv.json): - Refined volatility threshold descriptions with CV formula explanations - Clarified price trend thresholds (compares current vs. future N-hour average, not "per hour increase") - Standardized terminology (e.g., "entry" → "item", compound word consistency) - Consistently formatted all sensor names and descriptions - Added new data lifecycle status sensor names Technical changes: - Options flow refactored from linear to menu pattern with menu_options dict - New reset_to_defaults step with confirmation and abort handlers - Section extraction logic in best_price/peak_price steps now correctly reads from nested structure (period_settings.*, flexibility_settings.*, etc.) - Removed sections from general_settings, display_settings, volatility, etc. (simpler flat structure via menu navigation) Impact: Configuration wizard now reliably saves all settings. Users can navigate between setting areas without restarting the flow. Reset function enables quick recovery when experimenting with thresholds. Previously configured best/peak price settings are now correctly applied. |
||
|---|---|---|
| .. | ||
| api | ||
| binary_sensor | ||
| config_flow_handlers | ||
| coordinator | ||
| custom_translations | ||
| entity_utils | ||
| interval_pool | ||
| sensor | ||
| services | ||
| translations | ||
| utils | ||
| __init__.py | ||
| config_flow.py | ||
| const.py | ||
| data.py | ||
| diagnostics.py | ||
| entity.py | ||
| icons.json | ||
| manifest.json | ||
| services.yaml | ||