hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski 14b68a504b refactor(config): optimize volatility thresholds with separate ranges and improved UX
Volatility Threshold Optimization:
- Replaced global MIN/MAX_VOLATILITY_THRESHOLD (0-100%) with six separate
  constants for overlapping ranges per threshold level
- MODERATE: 5.0-25.0% (was: 0-100%)
- HIGH: 20.0-40.0% (was: 0-100%)
- VERY_HIGH: 35.0-80.0% (was: 0-100%)
- Added detailed comments explaining ranges and cascading requirements

Validators:
- Added three specific validation functions (one per threshold level)
- Added cross-validation ensuring MODERATE < HIGH < VERY_HIGH
- Added fallback to existing option values for completeness check
- Updated error keys to specific messages per threshold level

UI Improvements:
- Changed NumberSelector mode: BOX → SLIDER (consistency with other config steps)
- Changed step size: 0.1% → 1.0% (better UX, sufficient precision)
- Updated min/max ranges to match new validation constants

Translations:
- Removed: "invalid_volatility_threshold" (generic)
- Added: "invalid_volatility_threshold_moderate/high/very_high" (specific ranges)
- Added: "invalid_volatility_thresholds" (cross-validation error)
- Updated all 5 languages (de, en, nb, nl, sv)

Files modified:
- config_flow_handlers/options_flow.py: Updated validation logic
- config_flow_handlers/schemas.py: Updated NumberSelector configs
- config_flow_handlers/validators.py: Added specific validators + cross-validation
- const.py: Replaced global constants with six specific constants
- translations/*.json: Updated error messages (5 languages)

Impact: Users get clearer validation errors with specific ranges shown,
better UX with sliders and appropriate step size, and guaranteed
threshold ordering (MODERATE < HIGH < VERY_HIGH).
2025-11-21 17:31:07 +00:00
..
api fix(api): initialize time attribute to prevent AttributeError 2025-11-21 17:29:04 +00:00
binary_sensor refactor(naming): complete class naming convention alignment 2025-11-20 11:22:53 +00:00
config_flow_handlers refactor(config): optimize volatility thresholds with separate ranges and improved UX 2025-11-21 17:31:07 +00:00
coordinator feat(sensor): add data lifecycle diagnostic sensor with push updates 2025-11-20 15:12:41 +00:00
custom_translations feat(sensor): add data lifecycle diagnostic sensor with push updates 2025-11-20 15:12:41 +00:00
entity_utils refactor(entity): switch description content based on extended_descriptions 2025-11-21 17:30:29 +00:00
sensor feat(sensor): add data lifecycle diagnostic sensor with push updates 2025-11-20 15:12:41 +00:00
services refactor(coordinator): centralize time operations through TimeService 2025-11-19 18:36:12 +00:00
translations refactor(config): optimize volatility thresholds with separate ranges and improved UX 2025-11-21 17:31:07 +00:00
utils refactor(naming): complete class naming convention alignment 2025-11-20 11:22:53 +00:00
__init__.py feat(chart_export): migrate sensor config from UI to configuration.yaml 2025-11-20 13:41:26 +00:00
config_flow.py refactor(naming): complete class naming convention alignment 2025-11-20 11:22:53 +00:00
const.py refactor(config): optimize volatility thresholds with separate ranges and improved UX 2025-11-21 17:31:07 +00:00
data.py refactoring 2025-04-23 16:42:31 +00:00
diagnostics.py update dev environment 2025-11-03 15:54:01 +00:00
entity.py feat(api): add multi-home support and diagnostic sensors 2025-11-16 00:11:56 +00:00
manifest.json chore(release): bump version to 0.12.0 2025-11-21 11:19:14 +00:00
services.yaml feat(chart_export): add Chart Data Export diagnostic sensor 2025-11-17 03:14:02 +00:00