Energy Management in Home Assistant

I guess once or twice more!

Mine did not show up right away after adding the currentcost integration. I tried a lot of things but in the end I think it just appeared on its own in its own good time. I could see the sensor in HA but it was not offered as an option in energy config…but then it was. It may take time for statistics to accumulate?

I’m not sure how pedantic HA is but try

unit_of_measurement: 'kWh'

The capitalisation may be important ?

It may be. It is fussy about m3 vs m³.

General guide to SI units, if it is named after a person it gets capitalised.
eg

A Ampere
V Volta

m metre
s second

2 Likes

Good catch! That might be it
This sensor was available as an option without having to do anything…

1 Like

Did you have any luck finding solution for backfill?
Created separate thread for this topic earlier today

Great! It was the capitalisation… Now it works:

    - platform: mqtt
      name: "MQTTenergy"
      state_topic: "home-assistant/sensor03/energy"
      qos: 0
      device_class: energy
      state_class: total_increasing
      unit_of_measurement: "kWh"
1 Like

Great stuff! I integrated my solar pannels (a RPi reads the values from the inverters and stores them in an mariaDB, I load them to HA via the sql integration) and some individual devices - so far so good! :slight_smile:

Next, I will read my power-meter using a LED / pulse reader (GER only: Mache deinen Stromzähler smart - poweropti | powerfox - they provide a nice REST-API)

Question: Due to wrong incentive from our gov. one is way better off to sell 100% of the produced solar energy and buy 100% back of what you consume. So, I return 100% of my solar energy back to the grid…

As I get it correctly, HA assumes that “return to grid” is the difference between production and consumption - correct? Is there a way to configure the setting I’m faced with?

I guess, I can just delete / disable my solar panels - but then I’ll be missing the nice graphs :wink:

1 Like

Only for the period of production, and only when production is higher than consumption.

Yes, otherwise there would be nothing to return to the grid :wink:

I’d like to completely “disconnect” the production (solar panel) from the consumption - as I always return 100% of the production to the grid… no matter what the consumption is…

possible?

Wiring-wise, how does the grid know how much solar power you are selling them? I can only phathom that concept with two separate circuits, one for your panel supply and a separate one for the solar production…

Your power meter can ‘see’ in which direction the current is flowing.
Old style spinning disc meters would actually spin backwards !

How does he sell back 100% of what he produces? His solar panels would have to be hooked up directly to the grid with a meter for them to know I would think…

I don’t think he can view the numbers the way he wants, based on these graphs since it looks like it assumes you are consuming your own solar first with any excess/shortfall going to or coming from the grid…

The return to grid sensor would need a flag informing HA whether the net positive difference is sent to the grid or 100% in which case Returned to grid would be 32.1 kWh, non-fossil consumed would be 100% and self-consumed solar 0%…

Exactly! Two separate circuits with two separate meters (one “input”, one “output”)… very common here for older solar installations (due to bad governmental incentives, see above)

Not sure if I’ve missed this elsewhere, especially as I know there’s other people out there using ‘Amber Electric’ and the custom integration for it… but as Amber pass through the wholesale price for both grid consumption and the solar feed in the sensor for the feed in price can (and does) go negative, meaning that I’m being charged to export to the grid. Equally at times the grid consumption price goes negative and I get paid to consume electricity.

I’ve noticed that the Energy configuration page ‘complains’ when the price sensors go negative as it’s expecting positive numbers, presumably so that the ‘cost’ entities can be ‘always increasing’.

I haven’t yet worked out what it means in terms of the accuracy of the daily cost amounts but curious whether anyone else is in the same boat and whether they know if this will cause any issues?

I figured as much, as strange as it sounds to us in the rest of the world! I don’t see how the current HA Energy can show you want you want. I think it would need internal reprogramming and have a flag to indicate whether solar generation is consumed (< consumption) / sent to grid (> consumption) or 100% is sent to the grid for those graphs to be correct. I don’t even know if the calculated costs of consumption and credit for generation would be correct. If you added the solar sensor kWh with a negative cost, or created a template sensor that is the negative of the reported kWh, to the grid consumption, the cost calculations should be correct but the graphs wouldn’t show solar. Not ideal…

Sounds similar to @cavalon 's dilemma…

As good as the Energy stuff is in the last two iterations of Home Assistant, I feel that the dev(s) had no idea of the international issues involved. Different countries (and I suspect different regions and different scalpers energy suppliers) do things different ways. In NZ you are lucky to get 0.08c when selling power to the grid, yet the grid charges you around 0.30c. Some places seem to just set them off.

All crazy, and meanwhile we all go to hell in a handbasket…

… I don’t think, “the rest of the world” works all the same either :wink:

I think a workaround for my case is the following: Either use “solar production” (Input: total_increasing of my solar panels) OR “return to grid” (Input: total_increasing of my solar panels). But not both at the same time… and therefore only have half of the nice metrics and graphics… I will test and calculate the results, once I get my “input-meter” sensor…

BTW: I get around 0.45€ per kWh returned to the grid (fixed rate, incl. the gov. incentives, for the next 15 years, 25 years in total) and pay around 0.2€ per kWh I consume… That’s way it does not make any sense to self-consume the energy I produce. As I said, IMHO a poor form of incentive…

Edit: These forms of incentives don’t exist anymore (btw: Switzerland), as they incentive to max. production (and do nothing on the the consumption side). Today you get a compensation against your investments (~20% - 30%) and get “market” prices for energy returned to the grid (~0.1€). In this case, one has the incentive to max. the usage of the self-generated energy and to low the consumption as a whole…

Maybe a stupid question, but in the past my Homeassistant was relying on an awful lot Utilitity meters (daily, monthly, yearly, hi and low tariff). Is it now correct to assume that with the new Energy Management solution I no longer need those utility meters? I only care in the statistical data per day, month and year and believe the Energy Management solution could do the same…

Can anyone confirm?