springfall2008 / batpred

Home battery prediction and charging automation for Home Assistant, supporting many inverter types
https://springfall2008.github.io/batpred/
114 stars 39 forks source link

Changing mode does not stop/interrupt the current mode #513

Closed DJBenson closed 8 months ago

DJBenson commented 8 months ago

Describe the bug When the mode is changed from say "Control charge & discharge" to "Control charge" and there is an active discharge action, that action is not interrupted.

Expected behavior I would expect Predbat to respond to such a change by stopping the export immediately. The only way I could get the system to stop discharging was by modifying GivTCP settings directly (turned off timed export).

Predbat version 7.14.19

Environment details

springfall2008 commented 8 months ago

I can see the confusion, I'm afraid this is kind of by design in that if Predbat is not set to control discharge then it won't control them.

I suspect I could do something to cancel discharge when the mode is changed for safety reasons so will keep this ticket open while I think on it. The same issue applies to read-only mode where the current charge/discharge will be left as-is.

DJBenson commented 8 months ago

Thanks Trefor. For the less advanced user I could see this causing panic as it's not immediately obvious how to stop the export.

springfall2008 commented 8 months ago

Fixed in the current release