Understanding sensors and their usage in cards

Hey everyone,

I’ve recently set up some monitoring for my solar and grid usage in HA. I’m using solaredge-modbus-multi for my solar inverter, and a Shelly EM for the 2 mains coming from the grid into my panel. I’m looking to use the sensors from both of those integrations for power-flow-card-plus and displaying hourly + daily generation/usage using mini-graph-card.

I’m confused on the provided sensors for each and how to use them properly for everything I want to achieve. From my inverter I have sensors for AC Energy, AC Power, DC Power. From the Shelly EM I have sensors from each of the 2 channels for Energy, Energy Returned, and Power.

For the Home Assistant Energy dashboard, I just used AC Energy sensor from the inverter for my solar, and the Energy and Energy Returned sensors from both channels for the grid. That part all seems to be working properly and makes sense.

Now for power-flow-card-plus and mini-graph-card I’m a bit confused. It seems like I need to combine sensors from the 2 channels from the Shelly EM, but would I want to use Energy or Power? And for the helpers to combine one of them, what would the correct Unit of measurement, Device class, and State class be?

I’ve seen suggestions to set up a Utility meter helper with a daily reset which I did. I tried to use that in my mini-graph-card setups for hourly/daily but it doesn’t seem to be showing correct values.

Any help in understanding all of this or setting up the cards properly would be greatly appreciated!

In physics terms, power is an instantaneous value that indicates the rate at which energy is being used or transferred. For household applications, we talk about power in units of watts (W) or kilowatts (kW).

Energy is the capacity to do work, and the common units are watt-hours (Wh) or kilowatt-hours (kWh).

So if you have an old incandescent light bulb rated at 100W, then that’s how much power it takes to run it, and if you leave it on for an hour, it will have used 100Wh of energy.

Some people say that energy is “how much” and power is “how fast”, if that helps.

So if you want a card on your dashboard that shows what is happening with the electricity in your home right now, you probably want power. If you want a card to show you information over time that you might relate to your utility bill at the end of the month, you probably want energy.

As for any helpers you might create, take the cue from whatever sensors you are combining. They should already have units of measurement and device classes that you can copy.

1 Like

That really clears up a lot. Ty for explaining it like that!