CharlesGillanders / homeassistant-alphaESS

Monitor your energy generation, storage, and usage data using the official API from Alpha ESS.
MIT License
101 stars 22 forks source link

grid_to_load includes the grid_to_battery value, is that normal? #94

Closed JoeArny closed 11 months ago

JoeArny commented 11 months ago

Hi, I'm trying to add the values from the sensors to the Energy tab of Home Assistant, but I noticed that the grid_to_load sensor is reporting the total energy consumption, not just the load consumption. For instance, in this day below I charged my battery during the night and as you can see both grid_to_load and grid_to_battery goes up together: image Since there was pretty much no load active during the night I would expect the grid_to_load to be very low. If that's normal, how should I add those sensors to the Energy tab? Thanks.

CharlesGillanders commented 11 months ago

Grid to load includes grid to battery - that's how AlphaESS makes the figures available in their API. If you want to see only the load required by your house (that excludes grid battery charging) then you would need to create your own template sensor that subtracts grid to battery from grid to load to calculate grid to house.

There's a home assistant help article available for using template sensors.

https://www.home-assistant.io/integrations/template/

JoeArny commented 11 months ago

Hi Charles, thanks for the fast response and believe this solution will work perfectly. Cheers!!!