hif2k1 / battery_sim

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

All energy battery out counted as self consumption. #129

Open tbrasser opened 4 weeks ago

tbrasser commented 4 weeks ago

I have no solar yet, and all energy leaving the battery is accounted for as self-consumption, instead off showing simulated export to the grid.

Is this because the calculation for this needs solar generation present, any way I can work around this?

hif2k1 commented 3 weeks ago

Do you mean in the energy dashboard?

On Mon, 3 Jun 2024, 20:44 Thomas Brasser, @.***> wrote:

I have no solar yet, and all energy leaving the battery is accounted for as self-consumption, instead off showing simulated export to the grid.

Is this because the calculation for this needs solar generation present, any way I can work around this?

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

tbrasser commented 3 weeks ago

Yes.

I think I have circumvented it now by creating 2 template sensors:

fake solar power production: 1W (updating each minite)

fake grid export power: 1W (updating each minute)

Then 2 integral helpers on that to get energy in kWh

Added the fake grid export energy as export sensor on the battery_sim

Added the fake solar energy as solar in energy dashboard, and now it seems better:

Screenshot_2024-06-05-10-49-22-894_io.homeassistant.companion.android.jpg

Hope today to have a full charge/discharge cycle to see if the numbers add up.

hif2k1 commented 3 weeks ago

Ah I see. Interesting problem. I'm not sure if that is something I can fix within the battery sim itself. Glad you found a work around.

On Wed, 5 Jun 2024, 10:51 Thomas Brasser, @.***> wrote:

Yes.

I think I have circumvented it now by creating 2 template sensors:

fake solar power production: 1W (updating each minite)

fake grid export power: 1W (updating each minute)

Then 2 integral helpers on that to get energy in kWh

Added the fake grid export energy as export sensor on the battery_sim

Added the fake solar energy as solar in energy dashboard, and now it seems better:

Screenshot_2024-06-05-10-49-22-894_io.homeassistant.companion.android.jpg (view on web) https://github.com/hif2k1/battery_sim/assets/2816560/2668fe00-90ac-4f7b-b36e-f8a87c18a671

Hope today to have a full charge/discharge cycle to see if the numbers add up.

— Reply to this email directly, view it on GitHub https://github.com/hif2k1/battery_sim/issues/129#issuecomment-2149244039, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAIZGLUKC4RB5SJVR6IFV3ZF3GQXAVCNFSM6AAAAABIXBULBKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBZGI2DIMBTHE . You are receiving this because you commented.Message ID: @.***>