hif2k1 / battery_sim

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

All energy battery out counted as self consumption. #129

Open tbrasser opened 5 months ago

tbrasser commented 5 months 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 5 months 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 5 months 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 5 months 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: @.***>

rrozema commented 2 months ago

Actually, I think that is a bug in the energy flow card plus, not a problem in the battery simulation. I'm a back-end developer and I can read many sorts of programming languages, but I have no experience at all in building this type of targets and lack a development environment for it, so I can't build and test the change myself. However if I am not mistaking EiNSTeiN already has a fix for this.

tbrasser commented 1 month ago

Screenshot was of native energy dashboard.

In the meantime my real battery arrived. (still waiting on grid connection to get upgraded to 3 phase before connecting it)

This component was really helpful in getting a feel for sizing and cost analysis. Thanks again