Energy Management - cost & compensation not showing

Since I got no reaction when posting about this in existing threads I created a separate one.

I have the new Energy Management feature working fine. However, all financial values remain 0 in the new energy dashboard. While the entities actually have values:

image

image

image

image

I have no clue how to fix/debug this? Anyone has some pointers?

Thanks!

Thanks for reporting. I’m having this same issue!

Energy costs have been entered in the energy configuration - but no luck bring up a cost summary:

Any help would be appreciated :slight_smile:

I have the same problem!

I have tried with a fixed value and with a sensor that has the value in €/kWh, but the coost is always 0.

I have the latest version of HA Core.

1 Like

I had the same problem. Couldn’t figure out why it would not display cost information despite correctly setting up price in the energy configuration.

Then I remembered that I had to explicitly add the energy sensors in the recorder. Added the cost sensor and sure enough once it re-ran statistics, there it was.

Dont know if you all have similar setup managing what is in the recorder. But thought I would share my absent minded discovery.

Do you mean the recorder option in Hass config? I only have that pointed to mariadb but don’t explicitly in- or exclude entities.

Yes. I control what is included in the recorder in config.yaml so my recorder won’t grow too big. I think that if you don’t include/exclude then it should be in there, so you should be good on that.

You might check that the Energy integration created the cost entity. For instance my energy sensor is sensor.iotawatt_output_power_total_wh, once I added the price information, it created sensor.iotawatt_output_power_total_wh_cost where it accumulates cost information. That is the entity I had to add to my recorder.

Hope that helps.

2 Likes

So recorder config most likly isn’t the cause, since I don’t configure in- or exclude entities.

Maybe I configured the energy wrongly then? I did it as follows:

Mine is the same. Almost too simple to mess up. Have you re-started since you configured?

I experience the same problem.
Just did a prune of the history database and it doesn’t help either.
I see that the data is being saved.
Could it be that I don’t have all the checks in analytics settings?



2021-08-20 09_05_27-Window

That analytics part is just the data you send to Nabu Casa, isn’t it? I would love to receive some reaction from one of the developers giving us some more pointers.

please be sure to record the entities in recorder, otherwise the costs will remain 0.0.

From the recorder integration documentation:

By default, no entity will be excluded. To limit which entities are being exposed to recorder, you can use the include and exclude parameters.

So NO I won’t explicitly include them in the config. If they’re not recorded as part of the “no entity will be excluded” it’s a bug.

1 Like

OK, while I hoped 2021.9.x would fix stuff, it actually broke more. I must admit the energy addon is a very cool feature, but the deployment is a mess and the peak of the Home Assistant infamous “every update breaks your setup” reputation.

I did figure out that the MariaDB I use for history recording does contain values for my cost sensors in the states table. However there are no entries in the statistics_meta table for these cost sensors… I guess that’s what’s causing my cost not to show up and generating the log entry sensor.totaal_verbruik_net_hoog_tarief_cost has unknown unit EUR

Anyone know how to fix this?

it should be EUR/kWh as of the latest incarnation (and as it appears to be, though not documented nor confirmed as far as I know, €/kWh also works. Key though is the /kWh )

also see https://github.com/home-assistant/core/issues/55568#issuecomment-911824146

OK, I finally got it working, I added the missing records in the MariaDB statistics_meta table and it started working.

It’s still not fully working :frowning: Soince I added the record to the database, the cost/compensation started to work for the entries that were already in the database.
2 compensation entity and 1 cost sensor: all three have state_class: total_increasing

However the sensor for which I added the entry in the database manually because it was missing the state_class is measurement

I can’t see any way to change this to total_increasing as well. Even using customize_glob: in config didn’t work :frowning:

Same issue, finally got my utility meter into Energy Management yesterday and it is working, but the cost tracking is still set as 0.00 USD, I have everything setup as others have shown as well.

using a static cost is also showing 0.00 £/kWH for me… this used to work i believe…

image

Any warnings in the logs about currency not matching and statistics being suppressed ?
@skefda @brunoap

My sensor keeps track of changes in cost. But is showing 0 in energy tab.