Shelly EM3

Hi
Just installed a Shelly EM on my Solar PV system on the grid side of the inverter
now Shelly spec says the current transformer has a 1% accuracy spec, not sure about the EM.
My inverter is saying 2.515KW , EM shows 2.05 KW.
I dont thing the inverter claimed level is too far out as it agrees with the metered amount generated.
So a mathmatical frig needed in the configuration.yaml

  - platform: mqtt
    name: "Solar Power"
    state_topic: "shellies/shellyem-109664/emeter/0/power"
#  value_template: "{{ value|float / 60000 }}" # Fix for Watt-minutes
    qos: 1
    unit_of_measurement: "kW"

you can see where I’ve copied the config from
the ratio of reported values is 1:1.2268
would the correction with a value template be ?

value_template: "{{ value|float * 1.2268 }}"  

The only problem with that is it displays on the guage 2.30643852 KW
Three decimal places is adequate, what do I need to add so it just reads "2.306 KW

TIA

Use round().

An example with round can help you out:

       solaredge_energy_this_month_kwh:
            friendly_name: 'This Month'
            unit_of_measurement: 'kWh'
            value_template: "{{(states('sensor.solaredge_energy_this_month') | float / 1000) | round(2)}}"
            icon_template: mdi:white-balance-sunny

Do note the () around the bit before the round, it needs to be there otherwise the round will not work, at least that’s what I experience.

Many trhanks