Hi There @N1ghtmar3
Sorry it has taken me a while to respond to this post - I have been offline for a while because “real-life” needs some attention too.
Let’s try and separate these concerns out a little.
Solar Power
My installation uses the Power Integrator device for showing PV in the energy tab. As far as I can see it is working correctly. Today the PI device reports ~12.3kWh generated and the energy tab agrees with that number. It looks like your comments were created on the first day after you created the device - I don’t really understand how Energy could ever be less than Energy Today, unless the Inverter is sometimes reporting negative power from the PV. But that should be impossible. With more history, has the data settled down?
Here is the flow that I use to update the device:
I added the Midnight WHEN to ensure that the daily total was reset at midnight - otherwise because PV is 0 during the night it does not get reset until PV starts up again the next morning - it does not affect the data, but the insights look strange with the reset happening early the next morning rather than at midnight.
House Load
If the data from your Inverter device has the wrong sign, then I think you just need to include a calculation in the flow to invert the sign. I use the Temporary Variables app card “Calculate as a float” and then pass this value in as the power to be integrated - simply multiply the value from the inverter by -1.
BUT, PLEASE NOTE. This data will never be shown on the Energy Tab as the “house energy”. Homey computes the house energy by looking at how much energy has been imported (grid + solar) vs. how much energy has been exported - the difference between these two values MUST be consumed by the house (somewhere). In the energy tab the only thing you can do is show WHERE this energy has been consumed by defining consumers. These are devices that you nominate to be INCLUDED IN ENERGY and that draw on power in your in house (e.g. smart plugs, car charger…).
The difference between the energy consumed by the house and all of your energy using devices is untracked consumption.
Here is my “house” for today:
PV supply is 12.8kWh, grid EXPORT is 8.1kWh, battery CONSUMPTION is 1kWh. 12.8-(8.1+1) = 3.7. House consumption is shown as 3.7kWh.
I note on your energy picture, battery is shown NEGATIVE - this could be true in the short term (discharging between midnight and sunrise, for example) - but over a complete day the battery will always take more charge than it returns.
The maths on your energy picture just don’t seem to work. Grid energy is positive - that is importing. Solar is positive. Battery is negative. The total supply to the house is (13.1 + 20.5 + 3.9) = 37.5kWh. But the house consumption energy is less than 1kWh.
I do find it confusing that battery energy is reported from the battery’s point of view rather than the house point of view. +1kWh means the battery supplied -1kWh net to the house over the whole day. In contrast grid energy is from the house point of view - so -8.1kWh means 8.1kWh of EXPORT from the house. The “Contribution Today” capability of the Unreal Battery shows as negative and is a true reflection of the fact that today the batter has cost 1kWh (so far). It’s now discharging, so that “cost” will decline up until midnight.