Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 102854

Template sensors this morning started calculating zero energy intermittently, causing energy usage to go haywire

$
0
0

For some reason my two template energy sensors have stopped working correctly. For some reason they sometimes calculate to 0 which is really strange. This makes HA believe that the usage goes from 0 - whatever they have actually used, several times a day… Giving me a fantastic energy usage. This is from today… The water heater has used close to 3.000 kWh… LOL

template:
  - sensor:
      - unique_id: varmvattentotalenergy003
        name: "Varmvatten Total Energy"
        unit_of_measurement: "kWh"
        device_class: "energy"
        state_class: "total_increasing"
        state: >
          {{ states("sensor.varmvatten_gra_energy") |float + states("sensor.varmvatten_svart_energy") | float + states("sensor.varmvatten_brun_energy") | float }}
      - unique_id: varmvattentotalpower001
        name: "Varmvatten Total Power"
        unit_of_measurement: "W"
        device_class: "power"
        state_class: "measurement"
        state: >
          {{ states("sensor.varmvatten_gra_power") |float + states("sensor.varmvatten_svart_power") | float + states("sensor.varmvatten_brun_power") | float }}
      - unique_id: halltotalpower001
        name: "Häll Total Power"
        unit_of_measurement: "W"
        device_class: "power"
        state_class: "measurement"
        state: >
          {{ states("sensor.hall_vanster_power") |float + states("sensor.hall_hoger_power") | float }}
      - unique_id: halltotalenergy001
        name: "Häll Total Energy"
        unit_of_measurement: "kWh"
        device_class: "energy"
        state_class: "total_increasing"
        state: >
          {{ states("sensor.hall_vanster_energy") |float + states("sensor.hall_hoger_energy") | float }}

There is my sensors setup. They have been working just fine since I set them up… It is basically 2-fase appliances where I add the individual usage to one sum for the whole appliance.

The underlying “base” sensors are reporting the correct value to HA, and the correct values are recorded and displayed on an individual basis. It is only these sums that are wrong.

That’s how the composite sensor reports. Obviously something wrong there. I have restarted HA, didn’t help unfortunately.

Any ideas would be greatly appreciated.

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 102854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>