Sensor template problem

I’ve using scrape to get some data of my PV installation.
I want to add power production of my 2 PV inverters.
Then created some template sensor in configuration.yaml:

 - platform: template
    sensors:
     produkcja_razem_oba_inwertery:
      friendly_name: Produkcja ogólna
      entity_id: sensor.produkcja_ogolna
      unit_of_measurement: "W"
      value_template: >-
        {{ (float(states.sensor.aktualna_produkcja_inwerter_1.state) + float(states.sensor.aktualna_produkcja_inwerter_2.state)) | round(2) }}
     produkcja_kwh_oba_inwertery:
      friendly_name: Produkcja dzienna
      entity_id: sensor.produkcja_kwh
      unit_of_measurement: "kWh"
      value_template: >-
        {{ (float(states.sensor.produkcja_dzienna_1.state) + float(states.sensor.produkcja_dzienna_2.state)) | round(2) }}

Everything works fine but values not updating. Sensors updates only once after reboot hassio. :frowning:

I’d change the syntax to:

  value_template: '{{ (float(states.sensor.produkcja_dzienna_1.state) + float(states.sensor.produkcja_dzienna_2.state)) | round(2) }}'

No need for the >- in this case and I would always put single quotes ’ around them.

Thanks for the tip, but it didn’t resolved my problem.

Why single quotes around brackets {{ }} ? It’s only changed 0.00 Kwh to ‘0.00’ kWh in result.

Problem solved
I had typo in entities_id