hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski f92fc3b444 refactor(services): remove gradient_stop, use fixed 50% gradient
Implementation flaw discovered: gradient_stop calculated as
`(avg - min) / (max - min)` for combined data produces one value
applied to ALL series. Each series (VERY_CHEAP, NORMAL, VERY_EXPENSIVE)
has different min/max ranges, so the same gradient stop position
represents a different absolute price in each series.

Example failure case:
- VERY_CHEAP: 10-20 ct → 50% at 15 ct (below overall avg!)
- VERY_EXPENSIVE: 40-50 ct → 50% at 45 ct (above overall avg!)

Conclusion: Gradient shows middle of each series range, not average
price position.

Solution: Fixed 50% gradient purely for visual appeal. Semantic
information provided by:
- Series colors (CHEAP/NORMAL/EXPENSIVE)
- Grid lines (implicitly show average)
- Dynamic Y-axis bounds (optimal scaling via chart_metadata sensor)

Changes:
- sensor/chart_metadata.py: Remove gradient_stop extraction
- services/get_apexcharts_yaml.py: Fixed gradient at [50, 100]
- custom_translations/*.json: Remove gradient_stop references

Impact: Honest visualization with no false semantic signals. Feature
was never released, clean removal without migration.
2025-12-05 20:51:30 +00:00
..
api feat(interval-pool): add intelligent interval caching and memory optimization 2025-11-25 20:44:39 +00:00
binary_sensor feat(sensors): add chart_metadata sensor for lightweight chart configuration 2025-12-05 20:30:54 +00:00
config_flow_handlers refactor(config_flow): reorganize options flow steps with section structure 2025-12-02 20:23:31 +00:00
coordinator fix(coordinator): add _is_fetching flag and fix tomorrow data detection 2025-12-02 19:00:20 +00:00
custom_translations refactor(services): remove gradient_stop, use fixed 50% gradient 2025-12-05 20:51:30 +00:00
entity_utils refactor(price_info): price data handling to use unified interval retrieval 2025-11-24 10:49:34 +00:00
interval_pool feat(interval-pool): add intelligent interval caching and memory optimization 2025-11-25 20:44:39 +00:00
sensor refactor(services): remove gradient_stop, use fixed 50% gradient 2025-12-05 20:51:30 +00:00
services refactor(services): remove gradient_stop, use fixed 50% gradient 2025-12-05 20:51:30 +00:00
translations feat(sensors): add chart_metadata sensor for lightweight chart configuration 2025-12-05 20:30:54 +00:00
utils refactor(logging): remove verbose debug logging from price enrichment 2025-11-25 20:44:39 +00:00
__init__.py feat(sensors): add chart_metadata sensor for lightweight chart configuration 2025-12-05 20:30:54 +00:00
config_flow.py refactor(config_flow): rename TibberPricesFlowHandler to TibberPricesConfigFlowHandler 2025-11-25 20:44:39 +00:00
const.py feat(sensors): add chart_metadata sensor for lightweight chart configuration 2025-12-05 20:30:54 +00:00
data.py feat(interval-pool): add intelligent interval caching and memory optimization 2025-11-25 20:44:39 +00:00
diagnostics.py refactor: migrate from multi-home to single-home-per-coordinator architecture 2025-11-24 16:24:37 +00:00
entity.py feat(api): add multi-home support and diagnostic sensors 2025-11-16 00:11:56 +00:00
icons.json feat(services): add new services and icons for enhanced functionality and user experience 2025-12-02 18:46:15 +00:00
manifest.json chore(release): bump version to 0.20.0 2025-12-05 18:14:32 +00:00
services.yaml feat(apexcharts): add server-side metadata with dynamic yaxis and gradient 2025-12-05 18:14:18 +00:00