springfall2008 / batpred

Home battery prediction and charging automation for Home Assistant, supporting many inverter types
https://springfall2008.github.io/batpred/
95 stars 32 forks source link

h0 sensor values are incorrect #1253

Open gcoan opened 1 week ago

gcoan commented 1 week ago

Describe the bug Recently #1204 was fixed to correct the value of predbat_load_energy_h0

I think there may be a problem with other h0 sensors as well:

predbat_import_energy_h0 (how I spotted this issue), value 0.8kWh, but the givtcp import today kwh is 1.5kWh: image

export is closer, export_energy_h0 is 61.6kWh but givtcp value is 61.9kWh: image

pv_energy_h0 is also close, 61.5kWh vs the helper sum that adds my two GE inverter sensors together is 61.3kWh [possibly just a rounding issue] image

Couple of other things, none of these h0 sensors are mentioned in the output data documentation, only a passing reference to soc_kwh_h0 being the scaled battery kWh in apps.yaml. I can add them if you can confirm that they are supposed to be the measured inverter import, export, PV, etc.

And I think there might be something wrong with the way the sensors are defined in predbat as the HA history graph shows them separate from the givtcp sensors, so there must be a mismatch of type, uom or something??

Expected behavior Predbat sensors all described in the documentation and provide same results as equivalent inverter sensors.

Predbat version 8.1.2 HAOS 2x Gen 1 hybrid inverters

springfall2008 commented 5 days ago

One thing on my potential todo list is a breaking change to rename all predbat. entities to sensor. which will likely fix some of the issues in HA.

gcoan commented 5 days ago

I'm working on a PR to the documentation so will add the h0 entities in. If/when you rename them then they're there.