hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski 9a6eb44382 refactor(config): use negative values for Best Price min_distance
Best Price min_distance now uses negative values (-50 to 0) to match
semantic meaning "below average". Peak Price continues using positive
values (0 to 50) for "above average".

Uniform formula: avg * (1 + distance/100) works for both period types.
Sign indicates direction: negative = toward MIN (cheap), positive = toward MAX (expensive).

Changes:
- const.py: DEFAULT_BEST_PRICE_MIN_DISTANCE_FROM_AVG = -5 (was 5)
- schemas.py: Best Price range -50 to 0, Peak Price range 0 to 50
- validators.py: Separate validate_best_price_distance_percentage()
- level_filtering.py: Simplified to uniform formula (removed conditionals)
- translations: Separate error messages for Best/Peak distance validation
- tests: 37 comprehensive validator tests (100% coverage)

Impact: Configuration UI now visually represents direction relative to average.
Users see intuitive negative values for "below average" pricing.
2025-11-22 04:44:57 +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): use negative values for Best Price min_distance 2025-11-22 04:44:57 +00:00
coordinator refactor(config): use negative values for Best Price min_distance 2025-11-22 04:44:57 +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(sensors): add lifecycle callback for chart_data_export sensor 2025-11-22 04:44:38 +00:00
services refactor(coordinator): centralize time operations through TimeService 2025-11-19 18:36:12 +00:00
translations refactor(config): use negative values for Best Price min_distance 2025-11-22 04:44:57 +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): use negative values for Best Price min_distance 2025-11-22 04:44:57 +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 fix(manifest): remove integration_type field 2025-11-22 03:51:58 +00:00
services.yaml feat(chart_export): add Chart Data Export diagnostic sensor 2025-11-17 03:14:02 +00:00