Skip to content

v1.7.6 – Smart Price Turn-Off

Choose a tag to compare

@cm-makes cm-makes released this 10 Apr 11:25

Critical Fix: Price-Aware Turn-Off Logic

Bug fixed

Devices started on cheap grid power would not turn off when the price rose — they kept running on expensive grid power until the normal 10-minute excess-deficit timer kicked in.

Two new behaviors

1. Immediate turn-off when price rises
If a device was started because of cheap grid power (scheduling_reason: cheap_grid) and is_price_ok() becomes False (price rose above max_price, or cheap period ended), the device is turned off immediately. Reason: price_no_longer_cheap.

2. Keep running on cheap grid (no false turn-off)
Devices running on cheap grid power are no longer turned off by the excess-deficit check. Since grid power is intentionally used in this mode, negative excess is expected and must not trigger a turn-off.

Scenario summary

Situation Before After
Running on cheap_grid, price rises Runs 10 min on expensive power Turns off immediately
Running on cheap_grid, no PV Turns off after 10 min (excess deficit) Keeps running (price is cheap)
Running on cheap_grid, cheap period ends Runs until excess deficit Turns off immediately