Energy Management in Home Assistant

I would not recommend that, especially not using globs, as it is not universal. Additionally, please make sure the entities do NOT reset with those values.

So how should I do it?

Add work into adding actual support to those integrations. Report those, or contributing to actually adding support for them.

1 Like

Small chance I fear. Values are published on MQTT. Can I rewrite the sensor definition so they’ll work. It now looks like this:

- platform: mqtt
  name: Totaal verbruik net laag tarief
  unit_of_measurement: "kWh"
  state_topic: "sensors/power/slimme_meter/verbruik_laag_tarief"
  value_template: "{{ value|float / 1000 }}"

I’ll check the goodwe component creator if he’s planning to update that.

1 Like

You can add the last_reset_topic and last_reset_value_template to those.

Ok now I got it, thanks for the help. Strange thing is that I could not add the parameters directly to the sensor but like that:

      last_reset: '1970-01-01T00:00:00+00:00'
      state_class: measurement

Note that my relevant sensor names all end with “_total”, so if somebody wants to adopt that you should change your sensor names or the definition in the snipet above.


I don’t really understand what they should be if I cannot use ‘1970-01-01T00:00:00+00:00’ for last_reset_topic as you said. Let alone what value this attribute should have last_reset_value_template

At the moment this leads to an error, see this thread: I guess it is a bug, where/how could we report this?

Edit, never mind, I found it on GitHub, will report it in “core”.

Apologize being late to the party.
Any chance that EmonCMS becomes supported?
Being one of the leading Open Source monitoring Package it is a shame it is not


I am already tracking most of my devices for power consumption via sonoff POWs installed between those devices and power grid. I have detailed current energy usage (W) and a history for yesterday and last 30 days (KWh). Is there a way to import that data to HA Energy Management? Do I need to set unit of measurement somehow?


Are there any schematics for SlimmeLezer?
I have a p1 to usb cable and plenty wemos D1’s

1 Like

I think this is working for getting data from Powerwall setup

  - sensor:
    - name: Powerwall Energy Consumption Site
      state: "{{ state_attr('sensor.powerwall_site_now', 'energy_imported_(in_kW)') | float | round(0) }}"
      unit_of_measurement: 'kWh'
      state_class: measurement
      device_class: energy 

    - name: Powerwall Energy Loading Site
      state: "{{ state_attr('sensor.powerwall_site_now', 'energy_exported_(in_kW)') | float | round(0) }}"
      unit_of_measurement: 'kWh'
      state_class: measurement
      device_class: energy 

    - name: Powerwall Solar Generated Site
      state: "{{ state_attr('sensor.powerwall_solar_now', 'energy_exported_(in_kW)') | float | round(0) }}"
      unit_of_measurement: 'kWh'
      state_class: measurement
      device_class: energy 

I then had to go and add to the states manually, since I get errors when trying to do it in the template

  last_reset: '1970-01-01T00:00:00+00:00'
  last_reset_value_template: '1970-01-01T00:00:00+00:00'

Reported! Can't set last_reset value for MQTT sensor · Issue #53988 · home-assistant/core · GitHub

we are missing tons of device coming with Solaredge integration… I have both Solaredge standard integration and modbus one.

Missing a lot…

1 Like

Just a question, is it possible to also get this to work with consumed gas? I can add the gas usage to the dashboard when I change the “unit_of_measurement” from m3 to kWh, so in theory it should be possible. Are there plans to also add gas (m3) to the dashboard? Or is it already possible? If not, I’ll make a feature request.

Btw, it must be said, this dashboard is really a killer feature, I love it a lot! Well done!

it’s not working properly with Solaredge integration and even with modbus… I have both with Smartmeter and battery… I can’t find how to use all infos I have and integrate to energy dashboard

fantastic! Will this make it easier to get direct data from
my Epsolar inverters directly i to HA? Forecast is nice, but getting the actual production would be great - without buying hardware. Have USB-RS485 cable, and should be possible to connect directly with RPi?, if there was an integration?

Hi Frank, nice work!

From a developer point of view could you help out to point out how to make my custom component easy to intergrade with the new modules.

I created a Module to read private api of SAJ eSolar portal for those that do not have a Dongle with local API. I am still a bit new at creating modules but think i did a good first job. I also got a user asking me to make it compatible with this new module.

I am only struggling to find the correct documentation and examples. Hope you can help out or point me into the right direction.

The module can be found at :


Great work!

It may be a good idea to add to the article (and Home Assistant Glow readme) that pulse counters work just as well with a blinking LED as with the S0 / DIN 43864 standard for directly connected pulse reading.

Most older meters in Europe at least have an S0 output, and although your local utility may have put it behind the tamper-proof portion of the meter, many utilities will connect it for you if you ask.

When I try to configure my Enphase Envoy it complains about this: Key need to start with energy_

What does that mean?