Skip to content

Saving session / Axle VPP rate boost breaks automatic low-rate threshold - binary_sensor.predbat_low_rate_slot stuck ON, day rate reported as "low rate" #5050

Description

@kamenmackay

When a saving session / Axle VPP event is in the forecast, Predbat boosts both the import and export rates for that slot by the reward (load_saving_slot / load_axle_slot, tagged rate_replicate = "saving"). In automatic threshold mode (rate_low_threshold = 0), set_rate_thresholds() sets rate_import_cost_threshold = rate_max - 0.5, where rate_max now includes the synthetic boosted slot. On a two-rate tariff (25.95p day / 3.49p night) with a 100p/kWh event, the threshold becomes 125.45p and rate_scan_window classifies the entire ordinary day rate as "low rate windows".

Result: binary_sensor.predbat_low_rate_slot turned ON (on a 25.95p slot) and stayed ON continuously for ~24h - through the genuine 3.49p night window and the whole expensive day rate - and predbat.low_rate_start/end/cost reported the 25.95p day blocks as low rate.

Expected behaviour: the automatic threshold should be computed on the underlying tariff rates, excluding slots boosted by saving sessions / VPP events (the saving tag in rate_replicate is already there to key off), so only genuinely cheap tariff slots qualify.

Impact: automation-facing low-rate sensors misfire (an automation of ours fired on a non-cheap slot), and for users planning car charging on rates this would widen the car-charge scan to the whole day rate. The optimizer itself is unaffected (it uses the best-price thresholds).

Version: v9.0.2, HAOS add-on, GE inverter via GivTCP, Octopus Intelligent, 1 car.
Workaround: set rate_low_threshold to ~0.9 (threshold = 0.9 × average; our 25.95p day rate then correctly drops out).
Suggested fix: in set_rate_thresholds() (fetch.py), compute rate_min/rate_max/rate_average for the threshold over import rates excluding saving-tagged minutes.

I will add that this issue was mostly generated by the AI feature in Predbat and the only thing that I will add that it missed is that I had plan prediction set out to 36 hours rather than 24 (I've since switched it to 24) which I think might be important.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions