Energy sensor not adding to energy dashboard

Hi All, I have a smart energy meter connected to my TV mounted on the wall, and have another smart energy plug in the media cabinet on the floor.
RIght now I have the 2 individual sensors in the energy dashboard working OK however I’m looking to add the 2 sensors together and use 1 sensor instead if 2 sensors.
I’m using this to add the 2 sensors and getting accurate results, however I can’t seem to find that sensor when trying to add it to the energy dashboard.
See code below, any idea what I’m missing?

template:
  sensors:
    energy_total:
      friendly_name: 'Media Unit Daily Usage'
      unit_of_measurement: "kWh"
      entity_id:
        - sensor.media_plug_total_consumption
        - sensor.tp_link_smart_plug_e6b4_total_consumption
      value_template: "{{ (states('sensor.media_plug_total_consumption')|float + states('sensor.tp_link_smart_plug_e6b4_total_consumption')|float)|round(3) }}"

That is not the correct format for a template sensor. You have a mish-mash of old and new options and you have an option that has not been supported in the old version for a very long time (entity_id). You want something like this instead:

template:
  - sensor:
      - name: "Media Unit Daily Usage"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing # or just "total" if the source sensors never reset
        state: "{{ ( states('sensor.media_plug_total_consumption')|float(0) + states('sensor.tp_link_smart_plug_e6b4_total_consumption')|float(0) )|round(3) }}"
        availability: "{{ states('sensor.media_plug_total_consumption')|is_number and states('sensor.tp_link_smart_plug_e6b4_total_consumption')|is_number }}"

Hi Thanks so much for your response. I tried the code snippet you suggested and I’m getting the attached error.

Do you have what I wrote:

Or did you write this:

template:
  - sensors:

Oh sorry, made an error in the indentation, I fixed that and it’s showing the attached error.

Show exactly what you wrote.

You still have “sensors:” under template. It’s not plural. It’s just “sensor:”

wow, that’s such a rookie mistake from me, thank you so much.
That looks to be working now, I was able to add it now to the energy dashboard and the sensor started incrementing immediately.
I’ll monitor it over the next few days to see how it performs.