Anyone using Shelly EM?

You need to add a total energy consumption “integration” for each Shelly instantaneous power output reading. e.g.:

- platform: integration
  source: sensor.shelly_pm_somedevice_power
  name: "SomeDevice Total Energy Consumption"
  unit_time: h
  unit_prefix: k
  round: 2

These should then show up in that dropdown box.

The Shelly OS provided a “return to grid” sensor reading, essentially any time the clamp sensor goes negative the value is presented in a separate sensor that can be used by HA.

Anyone know how to replicate that in esphome?

Resolved this with a couple on template sensors in the HA config.

Apologies for resurrecting an old topic. I’m considering getting a Shelly Pro EM and using it to monitor grid import/export and heat pump power/energy consumption.

Am I correct in thinking it’s now possible to use a Riemann HA Helper, instead of creating a template sensor manually?

Integration - Riemann sum integral - Home Assistant (home-assistant.io)