Energy Management in Home Assistant

I figured it out. I need to use the total generated energy, not the daily generated.

1 Like

Exactly this!
I found this out myself just 20hrs ago.
I have dsmr slimme meter and all values are normally going in graphana + influxDB. All working fine. I excluded those measurements from HA db.
But this energy management relies on that apparently. No values coming in and repporting 0 forceverything.

So just to confirm.
I removed the exlude from recorder and history, and it works! No need to create template sensors at all. :slightly_smiling_face::+1:

Thanks for tip, I will check with total :slight_smile:

Forecast.solar has no good data outside Europe and North America.

Australia has the highest number of rooftop solar installations per capita and one of the highest usages of Home Assistant.

I would have preferred the Energy panel to be more flexible in terms of source data.

I can get data from Solcast, for example, via REST. But there is no way to integrate this in to the Energy Panel.

1 Like

It is consumption from the grid. My consumption meter is for the entire house, so I have to create sensors to estimate grid import (basically realtime consumption minus production with Reimann Sum sensors).

Hey, I’m trying to use your example to create a tariff for myself. I have 3 different rates and I’m getting errors about starting with the percent sign on the third line. Am I only allowed to use two rates in the templates? My rates are Super off Peak (Midnight - 6AM), Off Peak (6AM - 1PM, 9PM - Midnight), and Peak (1PM - 9PM). I’m attaching my code, and it would be appreciated if someone would help me out. Thanks in advance.

template:
# CobbEMC Night Flex Plan
  - name: Night Flex Tariff
    unit_of_measurement: USD
    state: >
      {% set off_peak = 0.07738 %}
      {% set peak = 0.1431 %}
      {% set super_off_peak = 0.477}
#      {%set super_off_peak = 0.0 %}
      {% if states('sensor.time') < ('06:00' | timestamp_custom('%H:%M', False)) %}
      {{( super_off_peak ) | float}}  {% else %}
      {% if states('sensor.time') < ('13:00' | timestamp_custom('%H:%M', False)) %}
      {{( off_peak ) | float}}  {% else %}
      {% if states('sensor.time') >= ('21:00' | timestamp_custom('%H:%M', False)) %}
      {{( off_peak ) | float}}  {% else %}
      {{( peak ) | float}}  {% endif %} {% endif %} {% endif %}
1 Like

Thanks! This seems to be the closest I can get to correct numbers although it is showing a tiny amount of feed-in during the night which should be impossible.

Do you have the same problem?

You need the Fronius smart meter, and you need to enable the sensors for the Fronius meter and inverter.

I use the following sensors for the energy dashboard:
For grid consumption use sensor.energy_real_consumed_fronius_meter_0_http_solar
For grid return use sensor.energy_real_produced_fronius_meter_0_http_solar
For solar generation use sensor.energy_total_fronius_inverter_1_http_solar

In my configuration.yaml I have

sensor:
  - platform: fronius
    resource: http://solar
    monitored_conditions:
      - sensor_type: power_flow
      - sensor_type: meter
      - sensor_type: inverter

If you have the template sensors to provide only positive values of Power (in W / kW), one for import and one for export, then you just need to create integration sensors to convert those to Energy (Wh / kWh).

Been waiting for this for a while as the Energy Easy (custom) integration (Melbourne/Australia) is no longer maintained and not working well with current code.

Looking at the two hardware options I would use the Home Assistant Glow. There’s a local (standalone) solution that counts LED pulses but there’s no data on solar contribution. Not sure this is a shortcoming of the app or the smart meter doesn’t have that info to begin with.

How does Home Assistant know details on the solar side of a house? Do I need to hook into the inverter (using an SMA inverter in my home)?

Thanks! That made it easy to get my Envoy working with home assistant and the energy tab

1 Like

I’ve just learned how to setup 3 different tariffs and measure cost if you are interested.

I’ve also fixed the constant 4W overnight production issue that all enphase suffer from using another sensor.

1 Like

I would love to see how you went about yours, I was thinking I should probably take the time to set up a template/entity to better track my tariffs and maybe could also include the daily service charge in it too.

As the first 340kWh/month gets billed at a lower rate then the balance at a higher rate.

2 Likes

Hey,

I added yesterday the new Energy Management.

image

This morning I got -10.2kWh!

Is this an issue? I only get energy generation from pvoutput.

Any ideas?

Thanx
JayTee

Don’t attach daily production as source of data, attach total device production as source of production :slight_smile:

1 Like

I can confirm - after change the source of production from daily to total everything looks working ok :slight_smile:

1 Like

you know, where to get this value from pvoutput?

I don’t know what is your source of data, but You must set the source of production data as total device production, not daily production. Looks like HA compare value from previous day and current reading and when the value reset (daily production) show “-” as production.

Ive created a new topic as almost 400 posts is a bit excessive.

2 Likes

Anyone did also test it with plugwise-beta? + growatt (total) as the solar panels ?

I did add the total devices(in kWh)13 hours ago, still no graphs.

In the homeassistant db the value’s are in there…
I did delete the full line config (recorder: with maria db) and start using the default for now… still no luck.