Statistics on virtual sensor

Hi,

I have two problems:

  1. I want to calculate the (estimate) power usage of some of big appliances together: electric stove and oven. I do not have any measurements on these items. Calculation should be something like:

[Electricity Meter Power consumption] + [PV grid_power] - [Boiler power] - [Washing machine] - […]

What’s the best way to do this? I was looking at the ‘Helpers’ but I cannot find any.

  1. With this data I want to see if there was for a certain period of time excessive power usage and give a warning (eg the stove has been left on longer than 45 min…). There is no Helper for that also, however I read that this should be done by Statistics, but this only works for physical sensors??

Any tips?

Why do you think so? You should create one template sensor that sums up the value and then a statistics one using that sensor to track…works for me.

Ok, I will try, however I’m a bit new. How can I create a template sensor? It’s not in Helpers?

This gave me the idea:

The source sensor to observe and compute statistical characteristics for. Only sensors and binary sensor are supported.

You can find that here…in the part where is says ‘state’ you sum-up your sensors alike below
The pipe-float is there as the states are always string-values, so in order to sumup…needs float

template:
  - sensor:
      - name: "PowerABC"
        unit_of_measurement: "kW"
        state: >
          {{ states('sensor.yourmeterpower') | float + states('yoursensor.bolerpower') | float +  ... + .... }}

Template - Home Assistant (home-assistant.io)