Energy Management in Home Assistant


I added yesterday the new Energy Management.


This morning I got -10.2kWh!

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

Any ideas?


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.


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.

In my case the growatt sensor is working fine:

unit_of_measurement: kWh
friendly_name: Growatt Solar Production
icon: mdi:solar-power
device_class: energy
state_class: measurement
last_reset: 1970-01-01T00:00:00+00:00

The solaredge modbus component got an update yesterday for energy module support.


I have only one energy consumption entity and no return, but the chart shows some produced energy. Can some one help me?

Has anyone got this to work with Tibber? Tibber doesn’t have a grid consumption entity, nor solar to house entity.

anyone having this issue?
I just see that my database gets corrupted all the time…

* Error while processing event StatisticsTask(start=datetime.datetime(2021, 8, 10, 8, 0, tzinfo=datetime.timezone.utc)): 'bar'
* Error while processing event StatisticsTask(start=datetime.datetime(2021, 8, 10, 9, 0, tzinfo=datetime.timezone.utc)): 'bar'

I did see before that some value’s where saved in the database with wrong time, like 2 hours before… the time is setup correct in the UI… i’m confused now

Unrecoverable sqlite3 database corruption detected: (sqlite3.DatabaseError) database disk image is malformed [SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id, context_parent_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?)] [parameters: ('state_changed', '{}', 'LOCAL', '2021-08-10 10:23:39.057876', '2021-08-10 10:23:39.057876', 'e9a4d55971618119de025e4fba934071', None, None)] (Background on this error at:

Thanks for help - I try to get this data now via mqtt :slight_smile:

thanks, so that device u used as solar right ?
But that device is a lifetime total device ?

I was using this device, maybe thats why it did not graph

Indeed, you need to use sensors that do NOT reset daily. Otherwise it won’t display proper stats.

Works great!
Most work, but…
My first daily reading of the solar panels is a negative value. Any idea where to look to solve this?

I use a Homewizard energylink connected to Homey and via MQTT to HA. Also some Innr/Fibaro plus for power reading.

Great to have this Energy Management feature now on-board.

I do track since years my OBIS smart meter with Tasmota and MQTT into HA.
How can I get my OBIS data to be used with the new Energy Monitor feature?


I have my own P1 meter based on a ESP8266 publishing all measurements to MQTT.
What I understand from previous comments, is that, in order to get the measurements selectable as ‘Grid consumption’ or ‘Return to grid’ states, the entities need a state_class: measurement and last_reset property.

But what kind of entity is needed for the Energy component? The current/live value, or the accumulated ‘total’ value?

I added the state_class: property to the ultility_meter: yaml and config check fails.
What do I do wrong?

1 Like

I don’t think you need state_class on utility_meter. Mine show up for selection in the energy dashboard without any editing.