Simulate home storage battery?

I am simulating various data from solar reports and offsetting it against my house usage, what I would like to do next is simulate a 4.8kwh home storage battery connection, I would like it to charge when there is excess solar generation and have it discharge when there isn’t enough generation.

My first thought was to use utility_meter but I need to set limits of 4.8kwh for the max, and 0.48kwh for the low (battery deep discharge is limited to 10%)

How can I accomplish this in Home Assistant?

Probably better accomplished with a template sensor than a utility meter.

I’m looking at Battery_sim - Home assistant home battery simulator - allows you to model how much energy you would save with a home battery - (battery_sim), maybe that will do the trick?

Shucks, that link is dead. Do you remember where you found battery sim?

Is this it? GitHub - hif2k1/battery_sim: Home assistant home battery simulator - allows you to model how much energy you would save with a home battery