Shelly 3EM-63W Gen3 (wire model) template sensor for energy dashboard

Hello everyone,

I’ve got a Shelly 3EM-63W Gen3 (wire model)
link for info - Shelly 3EM-63W Gen3 – Shelly Europe

I installed it on the end of my four-pole circuit breaker towards my 3-phase EV charger.
Id like to monitor the energy that is being used to charge my EV.

I have a Company EV and like to compare the energy data from my meter to the data the company gets from the charger. ( I cant get that info).

My freshly installed shelly 3 -phase monitor comes with a lot of sensors.

But I just cant figure out how I can combine the total kWh output towards my EV, which I can add to my energy dashboard.

I tried several templates:

      - name: "EV Totaal Watt"
        unique_id: ev_totaal_watt
        unit_of_measurement: "W"
        state: "{{ states('sensor.ev_lader_phase_a_active_power')|float(0) + states('sensor.ev_lader_phase_b_active_power')|float(0) + states('sensor.ev_lader_phase_c_active_power')|float(0) }}"
        device_class: power

or

  - sensor:
      - name: "EV_Verbruik"
        unique_id: ev_verbruik
        state: >-
          {{ 
            [ states('sensor.ev_lader_phase_a_active_power'), 
              states('sensor.ev_lader_phase_b_active_power'),
              states('sensor.ev_lader_phase_c_active_power'),
            ] | map('float') | sum
          }}
        availability: >-
          {{ 
            [ states('sensor.ev_lader_phase_a_active_power'), 
              states('sensor.ev_lader_phase_b_active_power'),
              states('sensor.ev_lader_phase_c_active_power'),
            ] | map('is_number') | min
          }}
        unit_of_measurement: W
        device_class: energy
        state_class: total_increasing

also

   sensor:
      - name: "EV_kWh"
        unit_of_measurement: "kWh"
        state_class: measurement
        device_class: energy
        state: >
          {{ [ states('sensor.ev_lader_phase_a_total_active_energy'), 
               states('sensor.ev_lader_phase_b_total_active_energy'),
               states('sensor.ev_lader_phase_c_total_active_energy') ]
             | map('float') | sum }}
        attributes:         
          last_reset: '1970-01-01T00:00:00+00:00'
        availability: >
          {{ not 'unavailable' in 
             [ states('sensor.ev_lader_phase_a_total_active_energy'), 
               states('sensor.ev_lader_phase_b_total_active_energy'),
               states('sensor.ev_lader_phase_c_total_active_energy') ] }}
template:
  - sensor:
      - name: "EV_Verbruik"
        unique_id: ev_verbruik
        state: >-
          {{ 
            [ states('sensor.ev_lader_phase_a_active_power'), 
              states('sensor.ev_lader_phase_b_active_power'),
              states('sensor.ev_lader_phase_c_active_power'),
            ] | map('float') | sum
          }}
        availability: >-
          {{ 
            [ states('sensor.ev_lader_phase_a_active_power'), 
              states('sensor.ev_lader_phase_b_active_power'),
              states('sensor.ev_lader_phase_c_active_power'),
            ] | map('is_number') | min
          }}
        unit_of_measurement: kWh
        device_class: energy
        state_class: total_increasing
   

Its’s either the energy dashboard does’nt see my sensor or, it screws up the data.
I just want to monitor the outgoing kWh.

These are the sensor the Shelly entities:

And these are for all 3 phases (A, B, and C)

and for last (total) entites:

Thanks!

Total active energy should do it.

Thats the weird part. That only shows 50% of the actual energy that my ev gets charged with.

See this screenshot:

My charger says its charging almost 3kWh, but that sensor says 1,3…

What I do see is that the Total Aparant Power (VA) is exactly the Wh that is being used…

There is a difference between these two: Difference Between Active Power, Reactive Power and Apparent Power – Schneider Electric
Total active power is what you get billed and what your energy meter is measuring. You can test that and compare the values

Ok I get what you aiming at.
But, for example, today Ive been charging at a low rate because during day I only want to charge with excess solar energy produced.
So now the charging stopped, and my company’s portal registered I charged my car ~3.1kW total.
But the HA energy dashboard, using the active energy sensor, only registered 1.68kW.

Maybe Im being dumb, but seeing the total apparent power is much more close to the actual kWh, could it be a bug or misconfigured sensor?

See following screenshots:

Apparent power:

Active power:

I know that active power is Watts and apparent is VA.

But maybe its a bug an can I make conversion of the apparent?

(dont shoot me if its stupid)

kW does not equal energy, but if you or the company forgot to write kWh then yes there is an issue with your shelly. Things to check are:
Go to your energy meter check the consumption, then turn on the charger and compare the values of your meter, the shelly and maybe the car/charger app.
Maybe the shelly is not connected to the right phases so check if the installation is correct and the 3 main phases are measured.
Then you can check the shelly by connecting it to other loads of which you know the consumption.
If the apparent value is closer you can make a riemann sum of it and change the sensor settings through customize.yaml

I figured out what the problem was. I checked the manual several times and connected it exactly as instructed. Then I thought: ‘It’s not working anyway, I’ll try connecting it the wrong way around.’

See the wiring diagram below: at the top, I see the grid operator supplying power. At the bottom, the house, which is where the power goes into the house.

I think the manual was written with the intention of measuring solar panel output towards the grid operator.

I did see the arrows, but I hadn’t thought about them. I wanted to measure from the supplier to the device. Therefore, in my opinion, this drawing is confusing.

Now, when I start charging towards the EV, the values from the Shelly and the EV charger match.

1 Like