Template new syntax not working

After every release my long-running HA is not liking the syntax yaml because they keep messing with it. I have given a new try at the new template syntax. It stopped complaining on the preliminary check but it doesn’t show up as a sensor. What am I doing wrong here:

template:
  - sensor:
      - name: "solar_power_total"
        unit_of_measurement: "W"
        value_template: "{{  (states('sensor.pv_power_a')|float) + (states('sensor.pv_power_b')|float) + (states('sensor.pv_power_a_2')|float) + (states('sensor.pv_power_b_2')|float) + (states('sensor.pv_power_a_3')|float) + (states('sensor.pv_power_b_3')|float) }}"

where are you putting that

FYI you don’t need a template for that calc either.

I’m trying to put this into a mini-graph-card HAC plugin. It worked fine until today when I updated using the legacy method. I’m trying to make it a sensor for the purposes of displaying a graph on the gui. The code is near the end of the configuration yaml block

Make a sensor group helper with the sum option selected.

I’ll give that a try. I THINK i know where to do that. I may need help but let me try first. Thank you very much

Ok I found helper->group-> added all six subsensors but it does not seem to be summing them all, just like the first one or two even though all 6 are in there. The good news is that the mini-card grapher is seeing it again. It’s just not summing correctly or at all

Disregard, I didn’t check off the summing function. All good. SO MANY THANKS! Consider this closed

FWIW, value_template is not a valid key in the current format… state is the appropriate key.

template:
  - sensor:
      - name: "solar_power_total"
        unit_of_measurement: "W"
        state: |
          {% set ent_list = ['sensor.pv_power_a', 'sensor.pv_power_b', 
          'sensor.pv_power_a_2', 'sensor.pv_power_b_2', 'sensor.pv_power_a_3',
          'sensor.pv_power_b_3'] %}
          {{ ent_list | map('states') | map('float', 0) | sum }}

Hello gazoo,

If one of the suggestions listed solves your problem, please consider clicking the solution button to close the thread. (even your own…)