Closed springfall2008 closed 3 months ago
I have (up to starting with batpred) thought of everything in % terms, which with different sized batteries is awkward. And in terms of kW-to-empty I much prefer using the batpred _soc_kw_h0 current battery soc in kwh (although the entity name is a bit obscure)
Just wondering if there is an easy way for me to implement this locally outside of predbat. Realise it's it's a nice to have and wouldn't be used by all, so may make the core code too complex. I did take a look at template sensors, but no idea how I would convert all the attribute readings
Sure in the chart code just divide by the battery size and multiply by 100
Thanks, hadn't thought of that! Got this far now, is there a way to change kWh into % in the chart code, and also change resolution to 0dp?
Well after a lot of googling and trial + error, I managed it! Apex charts is still a black art to me This is the code if useful to anyone else. Instances of 8.36 would need to be replaced with your own usable capacity, and the GivTCP SoC entity updated with inverter serial number.
EDITED to use native predbat % entities where available
`type: custom:apexcharts-card header: show: true title: Home Battery Prediction % show_states: true colorize_states: true graph_span: 60h span: start: minute offset: '-12h' now: show: true yaxis:
Closing, as Matt says can be done in the Apex chart
Some users would like charts in battery % rather than kWh