frient electricity meter LED 2 wrong values

I received the energy meter yesterday. I understand that the meter works with a pulse rate of 1000. Printed on my Wall meter is 5000 Imp/kWh
So i used this code to correct for that.
But the fixed one still shows 720W as the fixed value. But if i look on the actual digital meter it shows P as 330W

template:
  - sensor: 
    - name: "Instantaneous demand fixed"
      unique_id: "ydwRwMattmg"
      state_class: "measurement"
      device_class: "power"
      unit_of_measurement: "W"
      state: "{{ states('sensor.frient_a_s_emizb_141_instantaneous_demand')|float / 5 }}"
      availability: "{{ is_number(states('sensor.frient_a_s_emizb_141_instantaneous_demand')) }}"
  - sensor: 
    - name: "Summation fixed"
      unique_id: "aByI8S9eMlU"
      device_class: "energy"
      state_class: "total_increasing"
      unit_of_measurement: "kWh"
      state: "{{ states('sensor.frient_a_s_emizb_141_summation_delivered')|float / 5 }}"
      availability: "{{ is_number(states('sensor.frient_a_s_emizb_141_summation_delivered')) }}"

I do not have a Frient (I looked it up) but I would think it is a very bad device if it did not have a setting to do the calculation for you. So my guess is the frient has a compensation setting too (set to a wrong default) and it is conflicting with your fixed sensors.I would try to have the Frient do the math.

If you have a smart meter, I do find the description of the device weird. It suggests to use it on a smart meter led if you have already used the p1 port. But there are p1 port splitters too, so that would be a much more useful (and probably cheaper) solution than the Frient. I would only use it on a dumb meter.

I figured it out
I had put the Frient on the wrong optical output. Now it shows the correct values
image