yes it works perfectly, but since the auto discovery changed from kwh to wh, i had to had the conversion.
the latest version looks like this
- name: "House Energy kWh"
unique_id: sensor.house_energy_kwh
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
state: >
{% set val1 = ((states('sensor.shelly_3em_meter_total_0')|float(0))/1000)|round(2) %}
{% set val2 = ((states('sensor.shelly_3em_meter_total_1')|float(0))/1000)|round(2) %}
{% set val3 = ((states('sensor.shelly_3em_meter_total_2')|float(0))/1000)|round(2) %}
{{ val1 | float(0) + val2 | float(0) + val3 | float(0)
if
is_number(val1) and
is_number(val2) and
is_number(val3)
else
None
}}
availability: >-
{{
is_number(states('sensor.shelly_3em_meter_total_0')) and
is_number(states('sensor.shelly_3em_meter_total_1')) and
is_number(states('sensor.shelly_3em_meter_total_2'))
}}