Energy Management in Home Assistant

You have it wrong. The HA database is still recorded by recorder:

The energy and other long term stats are in the recorder: generated database.

There is no riemann sum being generated unless you have a power sensor and have added an integration: sensor to provide an energy sensor.

When I set everything up, I could swear I found all the data that is recorded by Recorder in my influxdb database. So I figured that InfluxDB is now the default HA database. I setup the “homeassistant” database in influxdb which from what I understand is what Recorder recognizes and uses.

But of course I could be wrong.

Regarding Riemann sum. I was not implying that there is one being generated officially. But the values that Energy is showing is not the current value of the entitiy. So Energy is tracking the change in value rather than the absolute.

Indeed, you are.

Hmmm, then can it be moved to the more effective influxdb?
I am guessing it is the home_assistant_v2.db?

As it says on the page I referred you to already:

The default database engine is SQLite which does not require any configuration. The database is stored in your Home Assistant configuration directory (’/config/’) and is named home-assistant_v2.db

HA needs a SQLite data base. You can replace the default one with mariadb.
In PARALLEL, you can use InfluxDB for other purposes but this will never be the default database of HA
With such implementation you keep a short lifetime for HA database ( one week on my side) and all the datas are also transferred in Influxb that has a long lifetime

Hmmm. Do you know if it is possible to change the look of the graphs in Energy?
I find it more informative to use line graphs rather than blocks. Plus, right now Energy uses only two colors no matter how many sensors are being tracked.

Not true, but perhaps theme dependent.

Each energy sensor is an entity which is graphed in the normal way and will presumably find its way into influxdb. Personally I find custom-mini-graph to be a great tool.

Default light:

Default dark:

I would say that they are the reference.
Since colors are assigned (see below), I assume it is a bug in “Energy usage” graph.

Each energy sensor is an entity which is graphed in the normal way and will presumably find its way into influxdb. Personally I find custom-mini-graph to be a great tool.

Where can I find these sensors? They are not listed as entities.
Looking at the “energy” file in “.storage” I can only see stats being created but no new sensors that could be called.
There is mention of energy_entity_from but I cannot find any created entities and I cannot select them e.g. in the “statistics graph”.

The first two graphs are your whole house as determined by your sensor that measures your whole house utility usage. How would you make those colours different? Blue for Monday, pink for Tuesday?

The third graph shows different colours, as I said.

You added the energy sensors to your energy configuration in order to get those graphs in the first place. They must be in developer tools|states. Add a graph for each or every one in lovelace.

The first two graphs are your whole house as determined by your sensor that measures your whole house utility usage.

No, those are exactly the same sensors as in the third graph. All individual sensors that I added to the overall consumption. Each should hence be shown with its respective contribution to the total.
It should look like this where the regions would be the days and coal etc. would be the different sensors:
image

They must be in developer tools|states

Nope, they are not.

So you have no entities reporting energy use? That cannot be or you wouldn’t have thisr graphs.

I have entities from the devices. But you said that the Energy integration creates new entities that create those data.
Because the energy values reported by the entities (hardware) are not identical to the values that the Energy integration is using. So Energy is tracking the data itself and creating new stats.
I would like access to these data and not the devices reported data.

No I did not.

Each energy sensor is an entity which is graphed in the normal way and will presumably find its way into influxdb. Personally I find custom-mini-graph to be a great tool.

Okay then this was a misunderstanding. I understood from your response that Energy creates energy sensors. Because it is obvious that each of my hardware energy sensors is an entity.

Okay, then the question remains how and what Energy integration is calculating and how.

Instead of using daily generation as your solar sensor, use your total generation, the total generation won’t ever be negative as opposed as the daily generation that Home Assistant takes as a negative value at the beginning of solar production on the next day. My question to you is, does your dashboard refresh after your inverter goes offline? (Sun down) because mine works perfectly until the sun goes down then it won’t refresh at all until 12am (next day)

This is one of the best extensions in Home Assistant! I really like it. Please take the following enhancement under consideration.
Electric cars are getting more and more available and when charging at home, they consume a substantial amount of electricity from the house hold. It would be great if you can split the electricity consumption between house and car.

Something like below would be great!

image

7 Likes

OR at least in this way… (since car is “part” of your household energy usage)
grafik

7 Likes

Does anybody know under which name Energy is storing the calculated data?

Energy is not just plotting data directly, it is calculating the changes. This is apparent because the data I am feeding it is a total_increasing, which means HA is monitoring the changes.
As this can be plotted by Energy, it must be plottable by other cards. But I would need to know the names Energy creates for each tracked device. Probably some simple syntax.
That way I could also store it long term in my InfluxDB database.

The energy cards are accessing the statistics table in ha’s database. the daily consumption is calculated by subtracting the consumption up until midnight from the consumption now.