hif2k1 / battery_sim

Home assistant home battery simulator - allows you to model how much energy you would save with a home battery
106 stars 13 forks source link

enhancement request: "discharge only" switch #96

Closed gwilford closed 7 months ago

gwilford commented 9 months ago

Just discovered your work - great integration!

I'm considering a tariff option where both import and export prices increase significantly for a 3hr "peak" period each day and during that period, I'd like to simulate exporting excess solar and/or discharging the battery to minimise importing. I'd like to avoid charging the battery during this period as it's worth more exporting directly to the grid. In some circumstances, I may want to force discharge for part of the period but I think that discharging to minimise import would generally be more cost-effective.

I read your workaround to the "charge only" request and will see if I can automate pausing the battery when generating more than consuming during the peak period but it would be great to have a "discharge only" switch for this.

hif2k1 commented 9 months ago

Ok, I will look to add this functionality. Do you know if it is something that you can actually do with real life batteries though?

On Sun, 17 Sept 2023 at 21:50, gwilford @.***> wrote:

Just discoverd your work - great integration!

I'm considering a tariff option where both import and export prices increase significantly for a 3hr "peak" period each day and during that period, I'd like to simulate exporting excess solar and/or discharging the battery to minimise importing. I'd like to avoid charging the battery during this period as it's worth more exporting directly to the grid. In some circumstances, I may want to force discharge for part of the period but I think that discharging to minimise import would generally be more cost-effective.

I read your workaround to the "charge only" request and will see if I can automate pausing the battery when generating more than consuming during the peak period but it would be great to have a "discharge only" switch for this.

— Reply to this email directly, view it on GitHub https://github.com/hif2k1/battery_sim/issues/96, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAIZGJ3OHAGFDTYPEFEWOLX25PCPANCNFSM6AAAAAA433DBY4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

catshapednoodles commented 8 months ago

For me it would be great to have a "discharge only" switch. I don't know if this is a toggle that would be present on most batteries, but the batteries that I'm considering have a feature where they can charge/discharge themselves based on the current day-ahead price. Having a "discharge only" switch makes it easier to simulate their behavior during expensive hours, where they will only discharge during expensive hours and only charge during cheap hours.

I'm trying to simulate this behavior with battery_sim. Currently I have an automation in place that does this already by pausing the battery if I'm exporting energy and the price is high, but it's not very intuitive to do it this way.

hif2k1 commented 7 months ago

This should now be supported in the latest release