Energy: Not showing the expected entities for consumption

This was my new style template for my whole house energy meter :


template:
  - sensor:
      - name: "House electricity energy"
        unit_of_measurement: 'kWh'
        state: >
          {{ (states("sensor.mains_consumed_energy") | float + states("sensor.upstairs_consumed_energy") | float) + (states("sensor.extra_consumed_energy") | float)  | round(2) }}       
        device_class: energy
        state_class: measurement          

I tried to add a last_reset, but that results in an error when checking config. That is why I had to add it under homeassistant in configuration.yaml.

It seems the developers forgot to add that important piece to the new template style when creating the new energy function.

1 Like