Victron, Modbus, Template - Calculate sum of entitier

Hi there,
I’m trying to get a template running.

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

http:
  use_x_forwarded_for: true
  trusted_proxies:
###

modbus: 
  - name: victron
    type: tcp
    host: 192.168.xx.xx
    port: 230

    sensors:
      - name: 'L1Power'
        unit_of_measurement: "W"
        slave: 100
        address: 820
        data_type: int16
        scan_interval: 3
        device_class: power

      - name: 'L2Power'
        unit_of_measurement: "W"
        slave: 100
        address: 821
        data_type: int16
        scan_interval: 3
        device_class: power       

      - name: 'L3Power'
        unit_of_measurement: "W"
        slave: 100
        address: 822
        data_type: int16
        scan_interval: 3
        device_class: power

  - platform: template
    sensors:
      kWh:
        friendly_name: "kWh"
        unit_of_measurement: 'kWh'
        # kW_daily is a 24 hour average, so use 24 hours as the time value.
        value_template: "{{ states('sensor.L1Power') + states('sensor.L2Power') }}"




 

Im trying to calcualte the sum of these three entities.
What am I missing? Looking for help.

Thanks in advance
Tom

The template goes under sensor: not modbus:.

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

http:
  use_x_forwarded_for: true
  trusted_proxies:
###

modbus: 
  - name: victron
    type: tcp
    host: 192.168.xx.xx
    port: 230

    sensors:
      - name: 'L1Power'
        unit_of_measurement: "W"
        slave: 100
        address: 820
        data_type: int16
        scan_interval: 3
        device_class: power

      - name: 'L2Power'
        unit_of_measurement: "W"
        slave: 100
        address: 821
        data_type: int16
        scan_interval: 3
        device_class: power       

      - name: 'L3Power'
        unit_of_measurement: "W"
        slave: 100
        address: 822
        data_type: int16
        scan_interval: 3
        device_class: power

sensor:
  - platform: template
    sensors:
      kWh:
        friendly_name: "kWh"
        unit_of_measurement: 'kWh'
        # kW_daily is a 24 hour average, so use 24 hours as the time value.
        value_template: "{{ states('sensor.L1Power') + states('sensor.L2Power') }}"