How to add sensors from a smartplug

Hello,
After update to version 0.114.3 I see that templates are not working.
Before I had this to my telldus Telldus TZWP-102 Plug-in Switch.

sensor:

      - platform: template
        sensors:
          energy_meter:
            value_template: "{{ states.sensor.power_line_watts.state | round (0) | float * 0.001 | round (3) }}"
            friendly_name: Energy Meter
            unit_of_measurement: 'kW'
          meter_test:
            value_template: "{{ states('sensor.energy_meter') | float > 3.0 }}"

This is not valid anymore.
How do I cofigure this plug to be able to send data to the Influxdb home_assistant database?
Thanks in advance!

It was never valid. This is rounding a string, not a number.

value_template: "{{ states.sensor.power_line_watts.state | round (0)...

And this is only rounding the number 0.001:

... 0.001 | round (3) }}"

Try this:

value_template: "{{ ( states('sensor.power_line_watts')|float * 0.001 )|round(3) }}"