Energy integrations: what exactly should the sensors be measuring?

I’m creating my own energy integration, because the power system in my house is pretty complicated and the whole picture can only be seen by merging data from several different sources. I’ve captured all the data and I’ve configured MQTT correctly, and I can create sensors from my data… but I feel like I’m stumbling at the last hurdle. What should the sensors I create actually be measuring? The energy dashboard wants power data in Wh/kWh, but that implies a time period.

Should I be creating sensors of state_class “total_increasing” that just give the running total of energy produced/consumed, for example the battery system has charged 3000Wh today and discharged 2500Wh? That kind of makes sense to me.

Is there no dashboard that just uses instantaneous values, like the solar panels are currently producing 3000W, and the home is currently consuming 500W or whatever? Because that seems like the more useful at a glance display.

At the end of the day (month, actually :wink: ), you re paying for the number of kW/h you consumed off the grid. So I assume that’s what you want.

That will only tell you if you are charging your batteries or using electricity from the grid.

Bottom-line: what do you want to know?

It’s not really about what I want to know, I can obviously create as many sensors as I please from the data I have at hand.

My question is about creating a dashboard from that data and what the energy dashboard wants, and if there isn’t a better energy dashboard widget set than the one that comes as default, particularly one that displays instantaneous power values rather than energy totals over whatever period the default dashboard energy flow widget shows.

(Edit: More googling has found this GitHub - ulic75/power-flow-card: A power distribution card inspired by the official Energy Distribution card for Home Assistant which is the dashboard widget I really want. I would still like to know what data I need to feed to the default energy flow dashboard card though)

In my case, I use the Energy dashboard purely for historical data (because that’s all it is) and don’t really look at it that often. I created a separate tab/dashboard that presents all my instantaneous data (power, gas usage rate, etc.) but I honestly rarely look at it too. On my main dashboard on several tablets in the house I have 2 values shown from template sensors: the current $/hr combined for my gas and power and then lbs of CO2 equivalent/hr for the same. I also have some dynamic coloring to tell me whether I’m better off using electric vs gas for cooking (from a GHG standpoint) too. I’ve found these 2 values to be all I really look at/care about and after tracking things for a while it’s generally pretty easy for me to infer what’s going on in my house just by looking at them. Full disclosure: I’m a mechanical/energy engineer so this is all well within my established wheelhouse. At the end of the day it just comes down to what you care about.