I am using an Emporia Vue to monitor a number of my circuits, and created a template sensor to aggregate them into categories. I have have confirmed that the aggregate template sensor correctly adds the individual values, but when I add these aggregated sensors to the built individual devices detail usage graph in the built-in Energy Dashboard, the values are way off (>5 times higher than expected.) I have confirmed the device class, units of measure and state class are the same as the individual circuit sensors being measured. Here is an example - I have a group called Heating & AC and on the Energy Dashboard it is showing up as 20.2 kWh, but it should be 3.2 kWh:
You can’t simply sum total_increasing sensors that reset into another total_increasing sensor, it messes with the reset logic.
If you must sum energy sensors with a template, try to sum non-resetting sensors only. If any of them ever go back to 0 or decrease, it will wreck the total sensor.
Can you please share a screenshot of the history of this sensor. Use the History panel in the side menu, not the pop-up more info card.
@karwosts - I don’t know if I have a non-resetting energy sensor for the circuits I am monitoring. I do have a sensor that tracks power. Would it be better to sum the power sensors and covert to energy?
@tom_l - screen show below. This is from the start of Jan 26 to today:
Yeah you can clearly see what karwosts is talking about in that graph.
Every time the energy surges upward at all those spikes it adds the energy amount equivalent to the height of the spike. The downward movement does nothing to the total, only upward.
You can create ever increasing energy sensors using the utility meter helper with no cycle defined. Then sum those.
Also an availability template for your new template sensor will be required for preventing this sort of thing if one of the sensors is unavailable. Why an availability template is important for energy template sensors
Thank you for all the help. Quick question - is there an “easy” way to accomplish this without creating a utility meter help with no cycle for all the individual circuits I’m tracking? The reason I’m asking is I have 50 individual circuits, which I’ve grouped into a much smaller logical grouping. For example, I have 9 separate light circuits that I am aggregating into “Lights”, 7 separate HVAC circuits that I’m aggregating into “HVAC”, etc. I originally used the simple addition because I setup a template sensor that just added everything together that had the same label as my grouping. I’m trying to not have too many individual items on the energy dashboard, but still make them meaningful.
The easiest way would be to throw hardware at it and put a physical sensor on each branch circuit.
Simple answer is that no, we don’t provide any functionality for aggregating groups of energy devices. Only real way to do it is with multiple utility_meters.
Ok. Again, thanks for the help and insights.

