#How to get accurate peak/off‑peak house consumption from Energy Dashboard?

1 messages · Page 1 of 1 (latest)

tulip spade
#

I am using the Home Assistant GoodWe integration with these sensors:
Meter Total Energy (export),
Meter Total Energy (import),
Total PV Generation,
Total Battery Charge,
Total Battery Discharge,
House consumption

My Energy Dashboard is configured with all of these except House consumption. I want to track my total house energy consumption split into peak and off‑peak hours (not just grid import/export).

I tried creating an integral (Riemann sum) sensor over House consumption, and also tried to reproduce the “House” tile value using Import + PV Generation - Export, but both results differ significantly from what the Energy Dashboard shows. I also couldn’t find a sensor that exposes the “House” value that the dashboard calculates (I read it might be visible somewhere in the developer tools but had no luck).

What is the best way to accurately get the house’s peak and off‑peak energy consumption, preferably using the same values the Energy Dashboard uses?

wild quiver
#

There's no such sensor for that.

#

The consumption dynamically computed from the long term statistics of your import, pv, export.

tulip spade
#

Hi @wild quiver, yes I am aware of that. That's why I am describing what I've tried so far and asking what the best and most accurate way would be to get such values. Because right now all approaches seem to be way off the values the "House" tile shows. For example the "House" tile would state 17kwh while the calculated (Import + PV generation - export) would state 14kwh and the integral over the "House consumption" sensor would state something around 20kwh

blazing nest
#

Are you looking to do something like this?

fiery current
#

With a utility meter with tarrifs you could split your grid import and export into peak and off-peak values. And use an automation to switch the utility meter between tarrifs.

You can also use that in the energy dashboard. But the new entities will have no history.

tulip spade
#

Yes in some way. I already got an automation to switch between peak/off peak import and peak/off peak export. But I also want to know how much energy I am consuming from my PV system and battery during peak / off peak hours.

Basically what I want to know is how much would I pay if I would not have a PV system. Therefore I want to track the house consumption during peak and off peak hours. But my approaches are way too off from what the "House" tile in the energy dashboard states.

fiery current
#

Then you can make peak/off-peak sensors with a utility meter for PV and battery discharge energy as well.

Or, if you are only interested in your conssuption in peak/off-peak, you could make a sensor that's the sum of the grid, battery discharge and PV energy and use a utility meter on that. But this only works if you use life time sensors. And this sensor isn't usable in the energy dashboard.

tulip spade
# fiery current Then you can make peak/off-peak sensors with a utility meter for PV and battery ...

I tried creating something similar, by doing "House consumption = Grid import + (pv generation - grid export - battery charge) + battery discharge "

But this calculation still seems to be off to what the energy dashboard's "House" tile states.

I think i got 3 ways to achive this:

  1. Try doing the same calculation as the energy dashboard does (what i described above)
  2. Try doing an integral over the "House consumption" sensor of my inverter
  3. Somehow get the raw values from the energy dashboard's statistics (I've read that they are stored in a special database and calculated on the fly)

And with what I've tried so far, I always seem to be way off the values that the energy dashboard show. How could I get more accurate results or even better how could I get that raw values the energy dashboard? I don't mind querying the database using SQL or such.

fiery current
#

Did you try it with the energy entities or power entities? And did you use life time sensors like I said?

If you have energy sensors already, there is nothing to gain by using an integral over power. You already have the info and an integral only introduces error.

Energy dashboard doesn't give any raw values about self consumption. As it just has to calculate it just like option 1.

So if you have a lifetime sensor you can use a utility meter over the sum. Otherwise you have to use a utility meter for every source and then sum.

It is possible to get the long term statistics (what the energy dashboard used) for the correct hours. But that's getting quite complex

tulip spade
# fiery current Did you try it with the energy entities or power entities? And did you use life ...

I have these sensors (and some others but I don't think they're useful here):

Meter Total Energy (export) -> Life time sensor accumulating values in kwh
Meter Total Energy (import) -> Life time sensor accumulating values in kwh
Total PV Generation -> Life time sensor accumulating values in kwh
Total Battery Charge -> Life time sensor accumulating values in kwh
Total Battery Discharge -> Life time sensor accumulating values in kwh
House consumption -> Sensor giving live values in watts

I used the those sensors (except the house consumption) for my "calculated" approach in option 1. The "house consumption" I used with option 2. as I don't have a life time sensor that shows the house consumption in kwh.

Ok so then I should go with option 1. if I understand you correct. This means, that my custom calculation sensor uses the same sensors as I configured the energy dashboard to use. But then I am unsure why that calculation doesn't give the same values as the energy dashboard.

#

For option 1 I created this template sensor that does the calculation:

{% set import_energy = states('sensor.meter_total_energy_import') | float(0) %}
{% set export_energy = states('sensor.meter_total_energy_export') | float(0) %}
{% set pv_generation = states('sensor.total_pv_generation') | float(0) %}
{% set battery_discharge = states('sensor.total_battery_discharge') | float(0) %}
{% set battery_charge = states('sensor.total_battery_charge') | float(0) %}
{% set pv_used_by_home = pv_generation - export_energy - battery_charge %}
{{ (import_energy + pv_used_by_home + battery_discharge) | round(3) }}