hass.tibber_prices/custom_components/tibber_prices/services
Julian Pawlowski ced9d8656b fix(chartdata): assign vertical transition lines to more expensive segment
Problem: In segmented price charts with connect_segments=true, vertical lines
at price level transitions were always drawn by the ending segment. This meant
a price INCREASE showed a cheap-colored line going UP, and a price DECREASE
showed an expensive-colored line going DOWN - counterintuitive for users.

Solution: Implement directional bridge-point logic using price level hierarchy:
- Add _is_transition_to_more_expensive() helper using PRICE_LEVEL_MAPPING and
  PRICE_RATING_MAPPING to determine transition direction
- Price INCREASE (cheap → expensive): The MORE EXPENSIVE segment draws the
  vertical line UP via new start-bridge logic (end-bridge at segment start)
- Price DECREASE (expensive → cheap): The MORE EXPENSIVE segment draws the
  vertical line DOWN via existing end-bridge logic (bridge at segment end)

Technical changes:
- Track prev_value and prev_price for segment start detection
- Add end-bridge points at segment starts for upward transitions
- Replace unconditional bridge points with directional hold/bridge logic
- Hold points extend segment horizontally when next segment handles transition

Impact: Vertical transition lines now consistently use the color of the more
expensive price level, making price movements more visually intuitive.
2025-12-21 17:40:13 +00:00
..
__init__.py feat(services): add fetch_price_info_range service and update schema 2025-11-25 20:44:39 +00:00
formatters.py fix: support main and subunit currency 2025-12-11 23:07:06 +00:00
get_apexcharts_yaml.py fix(apexcharts): synchronize y-axis tick intervals for consistent grid alignment 2025-12-21 17:39:12 +00:00
get_chartdata.py fix(chartdata): assign vertical transition lines to more expensive segment 2025-12-21 17:40:13 +00:00
get_price.py refactor(services): rename service modules to match service names 2025-11-25 20:44:39 +00:00
helpers.py feat(services): add rolling 48h window support to chart services 2025-12-01 23:46:09 +00:00
refresh_user_data.py refactor(services): split monolithic services.py into package 2025-11-18 20:07:05 +00:00