The new Energy section is really cool.
We use Shelly 3EM with the built-in Shelly integration (not ShellyForHASS) to measure all 3-phases coming to the house.
There are 2 options to integrate it with the new Energy section:
Add all 3 phases (A, B, and C) under “Configuration → Energy”. A stacked bar will be used to show the total.
Create a template sensor to combine the 3. It’s somewhat tricky to get it to work with the statistics engine. Here is what we use:
[Update: 2021.9 introduced a change, and the “state_class” should be “total_increasing” instead of “measurement”. The “last_reset” attribute is not needed anymore. A good post explaining the differences of “state_class” options can be found here.]
@msvb04, I think that you are referring to ShellyForHASS entities. The entities created by the built-in Shelly integration already have all required attributes, and there is no need to add anything for using them in the energy section. However, there is no “total” entity to sum all 3-phases, which is the reason for this post.
I’m using the builtin Shelly integration. I wanted to add up channel A and channel B to get a total for Watts used, but when I try to add a statistics graph card, I don’t see Power Total as an option to select. This is what I have for my template:
@flyingmoose, one thing which needs to be fixed is the “device_class”. It should be “power” (instead of “energy”). The “last_reset” attribute is not needed, since this is not a cumulative sensor. The rest looks fine.
Please note that you should give it an hour before adding the new card, since the statistics engine does it magic only once per hour (in the12th minute of the hour).
Here is our configuration for “power total” and “power factor total”, along with the new statistics graph cards:
Thank you! I made the change you suggested yesterday afternoon and waited overnight for statistics to populate, and it is working as expected now. Thank you again for your help!
However I am having problems due to (apparently) occasional unavailability of the EM3 causing the float filter to produce a 0 value which the Utility Meter then interprets as a reset causing spikes and big steps in the values of the daily/monthly totals. See below:
@pfrock42, you can find software workarounds, like keeping the old value if one of the phases is zero. However, you should probably fix the Wi-Fi coverage around the Shelly 3EM so you get a stable connection and reliable sensors.
Thanks. Good point about finding the root cause of the unavailability of the Shelly… I don’t think it’s the WiFi (I’ve put a lot of work into ensuring good Wifi around the house) but I’ll definitely double check!
I can confirm that this works! Although the Shelly has been more stable over the last 48h there have been 3 unavailability events that were correctly filtered out by this so thank you again.
I’m still looking into the root cause of the unavailability events… the WiFi signal at the Shelly is -65 dBm so, not great, but then neither is it streaming 4k video… Currently it is <10m from the access point but admittedly behind a heavy fire proof door (for building regs) so I’ll install another AP within the room and see if it improves.
Hi,
I’m using Shelly 3EM together with Solar PV and 3-phase system. I noticed that the “current_consumption” entities show negative values when my solar panels are working (makes sense).
However, I cannot figure out how to get real “consumption” of power in my house - that is the actual Power in W being used in the house (without solar). I tried to use the “total_returned” entity available but that shows only the accumulated energy (not power). Unfortunately - I don’t have a separate meter on my solar panels
Is it possible for me to see current Power usage (without taking into account the solar panels)?
Yes, that’s possible by calculation OR by placing the Shelly Clamps on the “right spots”.
How to calculate real consumption in a PV setup depends on how the PV has been integrated. There are multiple ways to do so…
Hybrid inverters (those with battery and power out support) are creating a virtually second neutral which could produce errors in measurement.
Measurement:
With Hybrid inverters one has to measure at least three points (Inverter-Grid, Grid-House, Inverter-House)
With Non Hybrid Inverters one has to measure at least two points (Inverter-Grid, Grid-House)
Do you have a hybrid inverter (with batteries)? Those
how exactly did you connect the phases of the shelly?