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?
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 }}"
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.