Energy usage cost breakdown


I have an Emporia Vue that reads the meter consumption by minute, day, and month. I also have several plug with energy consumption meter. How can I have the plug, the Tesla charger and other be sub costs of the entire house consumption?

As you can see the Energy dashboards adds up all the meters together and result is obviously wrong.



If you are going to add separate loads like that you will have to create a template sensor to replace the Whole House sensor with: Whole House minus the extra loads you want to add.

Makes sense. Do you have a template I can copy or have as an example?

  - sensor:
      - name: Unmonitored Load
        icon: 'mdi:whatever_you_want'
        state_class: total_increasing
        device_class: energy
        unit_of_measurement: kWh
        state: >
          {{ states('sensor.total_house_energy')|float(0) -
             states('sensor.tesla_energy')|float(0) - 
             states('sensor.washing_energy')|float(0) - 
             states('sensor.dryer_energy')|float(0) - 
             states('sensor.aircon_energy')|float(0) }}
        availability: >
          {{ states('sensor.total_house_energy')|is_number and
             states('sensor.tesla_energy')|is_number and
             states('sensor.washing_energy')|is_number and
             states('sensor.dryer_energy')|is_number and
             states('sensor.aircon_energy')|is_number }}

I finally worked on this sensor; the load comes with a -4,076,605.766 kWh. That is because the sensor.total_energy_house is daily while the others have the total value, I believe.

Is there a way to filter by the current day before summing them up?


Then you will have to create a daily total house energy sensor using the Utility Meter integration and use that in the template.

I already have that. All the others are not daily.

Well then you have to do that to the others.