hass.tibber_prices/custom_components/tibber_prices
Julian Pawlowski b8e40bfa3b fix(services): prevent plan_charging overcharge from segment-constraint bridging
apply_segment_constraints could add far more grid energy than requested when
max_cycles_per_day or min_charge_duration_minutes forced bridging across
expensive gaps between cheap intervals. With max_cycles_per_day=1, isolated
cheap intervals were merged into one continuous segment by filling every gap
in between, without ever trimming the surplus back down, resulting in
achieved_soc_percent far above 100%.

Add a post-bridging trim step that removes segment-edge intervals (highest
price first) until total grid energy matches the requested target again,
while still respecting max_cycles_per_day/min_charge_duration_minutes and
never dropping below the target itself (fixed-power mode's expected
last-interval rounding overshoot is preserved).

A related edge case is also fixed: trimming could previously remove an
interval required to satisfy a must_reach_by deadline, silently flipping
deadline_met to False even though the overall energy target was still
reached. Deadline-critical intervals are now passed through as
protected_starts and are never removed during trimming.

Fixes #167

Impact: plan_charging no longer overcharges the battery/EV past the
requested target SoC when max_cycles_per_day or min_charge_duration_minutes
is set, and must_reach_by deadlines are honored even when those constraints
require bridging across expensive price gaps.
2026-07-04 17:43:04 +00:00
..
api fix(api): accept priceInfoRange-only responses and retry transient empty data 2026-05-30 14:46:13 +00:00
binary_sensor feat(coordinator): surface prolonged API outages and cache-fallback state 2026-05-30 14:46:32 +00:00
blueprints fix(blueprints): fix home_connect_alt service call and correct sensor description 2026-05-03 22:16:56 +00:00
brand feat(brand): update dark icons for improved visual consistency 2026-04-09 19:04:26 +00:00
config_flow_handlers refactor(repairs): simplify currency mode change notification to one-shot 2026-04-15 10:00:59 +00:00
coordinator feat(coordinator): surface prolonged API outages and cache-fallback state 2026-05-30 14:46:32 +00:00
custom_translations docs(sensor-reference): update translations for price phase sensors 2026-05-30 13:04:55 +00:00
entity_utils fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
interval_pool feat(services): isolate price-fetch failures and add success flag to responses 2026-05-30 14:46:23 +00:00
number fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
sensor feat(services): add price_source parameter to get_chartdata and get_apexcharts_yaml 2026-05-03 18:48:36 +00:00
services fix(services): prevent plan_charging overcharge from segment-constraint bridging 2026-07-04 17:43:04 +00:00
switch fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
translations fix(translations): correct message formatting in multiple language files 2026-06-01 11:31:18 +00:00
utils feat(services): add power-profile-weighted window selection 2026-05-03 22:16:08 +00:00
__init__.py chore(blueprints): disable automatic blueprint installation 2026-05-03 22:17:02 +00:00
config_flow.py fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
const.py feat(entity): expose integration version as sw_version in device info 2026-04-20 18:44:34 +00:00
data.py feat(interval-pool): add intelligent interval caching and memory optimization 2025-11-25 20:44:39 +00:00
diagnostics.py fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
entity.py feat(entity): expose integration version as sw_version in device info 2026-04-20 18:44:34 +00:00
icons.json feat(services): add plan_charging service for battery/EV scheduling 2026-04-20 21:43:41 +00:00
manifest.json chore(release): bump version to 0.32.0b1 2026-05-30 14:48:01 +00:00
migrations.py fix(services): use injected now in resolve_search_range day offset 2026-04-14 19:33:24 +00:00
services.yaml refactor(services): change step value to 'any' for plan_charging fields 2026-06-01 11:16:21 +00:00