Energy Management in Home Assistant

Is it possible (if, so, how) to use the energy dashboard elements at: Energy Cards - Home Assistant in a strictly yaml mode lovelace implementation? I get no data when I put them in my lovelace configuration files. When I select the energy configuration link in the above, nothing happens but a blank screen and I don’t have a .storage/energy file or directory (HA supervised V2022.2.9)

I have an account with UMeter and my energy consumption uploads every hour.
I can export these numbers to a .csv file.
Is there a way to connect home assistant directly to Umeter or other provider?

platform: template
sensors:
lifepo4_battery_power_watts:
friendly_name: “Battery Power Watts”
unit_of_measurement: ‘W’
value_template: >
{{ states(‘sensor.battery_voltage’)|float * states(‘sensor.battery_current’)|float }}
device_class: power
state_class: measurement

Something is wrong – don’t know what.
Maybe there is a way to put on the energy management some sort of voltage and amperage slots - and auto config the watt hour output - not stupid proof but easier.
Thank you in advance for helping

Sorry guys.
I have read almost every post, learn a lot, but still don’t know why I have the wrong flow in mine dashboard.
As show in picture solar is alway’s flown to the grid and the grid I always inject in to house.
How can I correct the flow?
It’s driving me nuts

Another example of erroneous data in HA Energy Module.

We really need a way to easily correct such anomalies.

5 Likes

I have the same problem and would like to delete two days with enormous power usage.
It is okay if I can set these two days to a fixed number and correct the statistic total value.
I would be very happy if someone could post an example of the SQL queries needed.
It happend after updating to Home Assistant 2022.2 because of a wrong unit.

1 Like

I agree with Ryssel.
Today when I updated Home Assistant from 2022.03.01 to 2022.03.02 the statistics was destroyed.


Could a new field be added here that lists the self consumed solar energy?
Would be nice to have this to create better statistics on the self consumed solar energy and the savings

Yes, under grid consumption add your “solar consumption” entity. If it’s provided by your solar system.

The value has to be calculated and is already calculated by HA…it’s just showing up only in the graphs, not in the statistics, it’s a little weird this is not included, might be an oversight?

No, you have to add it under grid consumption, like this.

It’s a microinverter based system, they of course have no way to know if the power is used locally or exported to the grid so there is no entity like that available.

What is available thou is the exported power and created power by the solar system, HA already calculates the self cosumed power from these values so it shouldn’t be much work to get this into the statistics for the devs.
image

Yes. Same Problem here. Please give us an example, to correct such problemns

HI,

I’m a little bit confused after reading different posts about what is the correct input measure to use for energy.
What is the expected input for the energy dashboard? kWh? W?

I have shelly EM, what is the correct data to use?

then I have smart plug with this data
image

To track energy from the grid I’m doing that

  # Power Monitoring sensor (Shelly EM)
  - platform: mqtt
    name: home_total_w
    state_topic: "shellies/shellyem/emeter/0/power"
    unit_of_measurement: "W"
    force_update: true
  # Power to Energy Integration
  - platform: integration
    source: sensor.home_total_w
    name: total_kWh
    unit_prefix: k
    unit_time: h
    method: left

  - platform: template
    sensors:
      total_energy_day:
        friendly_name_template: "Daily from GRID"
        icon_template: mdi:counter
        value_template: "{{((states.sensor.total_energy_day_f1.state | float(0)) + (states.sensor.total_energy_day_f23.state | float(0))) | round(3) }}"
        unit_of_measurement: "KWh"

utility_meter:
  total_energy_day:
    source: sensor.total_kWh
    cycle: daily
    tariffs:
      - f1
      - f23

then from consumtion devices:
with shelly


- platform: mqtt
    name: "WashMachine"
    state_topic: "shellies/shellyem/emeter/1/total"
    unit_of_measurement: "kWh"
    value_template: "{{ (value|float(0) / 1000 ) | round (3) }}"
  - platform: template
    sensors:
      consumption_washmachine:
        friendly_name: "Energy WashMachine"
        value_template: '{{ (states("sensor.washmachine")|float(0)|round(1) }}'
        unit_of_measurement: "kWh"
        icon_template: mdi:flash

  consumption_washmachine_daily:
    source: sensor.consumption_washmachine
    cycle: daily

with smart plug

   consumption_daily_dishwasher:
    source: sensor.dishwasher_plug_total_energy
    cycle: daily

Is that the correct way? do I need to define all the time the unit of measure? adding these to the energy dashboard will keep consistency across the different units?

Can you point me to the right direction?
regards

Hi!

I’m currently using Glow with my Sagemcom T210 D Smart Meter and it works as expected. However we got a solar panel yesterday and I found out that the LED on the meter also blinks if we produce more energy than we consume. This in turn makes energy which is returned to the grid get counted as if it was consumed.
I tried to find out more about it but couldn’t get any info other than that I can’t change this behavior on the meter.
Has anyone faced the same issue or an idea on what I could do about it?

kind regards

More nonsensical energy data today. Apparently between midnight and 1AM my solar PV system produced 46.5MWh of output.

Of course there’s no user friendly way to correct these anomalies which seem to randomly occur from time to time and so it completely screws up any sensible charting for Home Energy Management.

Can we please get a way to be able to fix these erroneous entries?

I don’t know why they appear, I have the same data feeding other energy management systems and none of them have these erroneous entries.

Its not from a retained mqtt msg by chance? I was getting similar errors after a restart from the retained msg being well below the previous and next data points.

I haven’t a clue as to what this means.

The MQTT service can hang onto and broadcast messages from devices that no longer exist. Install MQTT Explorer and you can delete them,

1 Like

Thanks but the information in that link is mostly meaningless to me. I don’t know what MQTT is other than as a means devices use to integrate with HA.

I only have one device which uses MQTT, the Solar Assistant system monitoring my off-grid inverter. There is nothing else to delete.

EDIT: I should add that the erroneous solar production (and consumption) values are being assigned to the solar production data for my grid-tied Fronius inverter, not the off-grid system (which is what uses MQTT).