Energy Management in Home Assistant

Ops… yeah, correct, I took the screenshot to the wrong sensor.
The correct one is set into energy dashboard setting but… no history for that. I just added it to recorder and rebooted, let’s see if in a couple of hours it will start working.

For me, I believe this Energy management feature was designed for users with grid-tie solar systems.

1 Like

Good afternoon.
In “Grid consumption” is the total consumption of the house, or what the house consumes only from the grid?

Only Grid Imports.

House consumption will equal Grid Imports + (if you have solar) solar generation - Grid Returns (exports)

hi,
Well i am recording everything in HASS,
i have this in my yaml
recorder:
db_url: mysql://*****:******@core-mariadb/************

Still no graphs…

i did even start a new db 3 hours ago.

My devices are in kWh

Ok, after adding entities to recorder, energy dashboard started to show data. Thanks.

Has anyone figured out what to do if incoming power shows as positive or negative depeneding on solar production? I guess a solution would be to create a manual sensor that just shows the positive number and a separate sensor that would just show whatever is negative? This really should be an option when you are setting up the dashboard.

do i still need to add entity’s to recorder?
even if i did setup it like this ?

recorder:
`db_url: mysql://*****:******@core-mariadb/************`

i still have no graphs

ok, I found it, thanks

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