Duplicate Sensor Template help

Hello.

Can someone please help me as I’m struggling to get a template to work. I have a heater that is on a smart plug that give me the energy used when its on. I also have another heater that is exactly the same as the first one except the smart plug does not give me the energy used etc. They are in a group and work together however I can only get one of them to appear in the energy area of HA so as a result I’m trying to create a template to give me a duplicate of the energy used on the first one.

This is what I have so far and I’m unclear what I am doing wrong.

template:
  - sensor:
      - name: "Duplicate Heater"
        unit_of_measurement: "kWh"
        state: "{{ states('sensor.gardenroom_heat_kitchen_energy_today') }}"
        state_class: "total_increasing"

Thank you for looking and any advice you may give.

Go to Developer Tools > Statistics and look for the Duplicate Heater sensor in the list. Confirm it is present and has no issues. Let us know what you find there (or don’t find).

1 Like

Sorry for the slow response, I looked in that area and it looked ok. So this is what I did to get it all working.

template:
  - sensor:
      - name: "GardenRoom Heat Lounge Virtual"
        unit_of_measurement: "kWh"
        state: "{{ states('sensor.gardenroom_heat_kitchen_energy_today') }}"
        state_class: "total_increasing"
        device_class: "energy"

Thank you for your help as without it I would still have assumed it was not working as I expected.