SMA W into kW and . into , and add 2. PV

This is already working:

type: entities
entities:

  • entity: sensor.smarawpoweractotal
  • entity: sensor.smarawdailyenergy
  • entity: sensor.smarawtotalenergy
    title: SMA Wechselrichter
    state_color: true

Would like to change . into , and to change W into kW and add 2 PV´s into one summery

This new entity creating in configuration.yaml as flollowed is not working:

  • platform: template << do I need this part ? >>
    sensors:
    kilowatt_smarawpoweractotal:
    friendly_name: “SMA Kilowatt Sensor”
    unit_of_measurement: “kW”
    value_template: ‘{{ value | replace (“,”, “.”) | float }}’
    value_template: “{{ states(‘sensor.smarawpoweractotal’) | float * 0.001 }}”

    • name: “PV Robert Gesamt”
      unique_id: “pv_robert_energy_gesamt”
      unit_of_measurement: “kWh”
      state: >
      {{
      float(states(‘sensor.kilowatt_smarawpoweractotal’)) +
      float(states(‘sensor.inv_bt2330477905_mppt_total_input_power’))
      }}

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16