JonasPed / homeassistant-eloverblik

Home Assistant Custom Component showing data from eloverblik.dk
Apache License 2.0
180 stars 34 forks source link

Energy grid consumption #40

Closed Langthjem closed 2 years ago

Langthjem commented 2 years ago

It would be awesome to have a sensor for pricing for use in "Grid consumption" as a "Use an entity tracking the total costs". I believe it should be possible to pair the hourly sensors, or a total, with the response from https://api.eloverblik.dk/CustomerApi/api/meteringpoints/meteringpoint/getcharges

runemoennike commented 2 years ago

I was also looking at this, but unfortunately it seems it doesn't include the full price:

image

The API documentation here is a bit harder to decipher, but I assume it doesn't have the price from the "elleverandør" either, which means it'd be off by about a third.

sorentorp commented 2 years ago

Wouldn't it be easier to add an hour-to-hour table where the user could add those different prices? Maybe it is too different pr. power-supplier? Fx. https://dinel.dk/priser-og-bestemmelser/#:~:text=Priser%20pr.%201.%20januar%202022

runemoennike commented 2 years ago

Your link is to a company that owns the powergrid in an area, and their prices are included in the information from the eloverblik API mentioned above :) The price from the supplier ("el-leverandør") are not included, and indeed they vary widely, also depending on the subscription -- for instance you can get plans where you pay based on the spot price which changes every hour of every day.

sorentorp commented 2 years ago

@runemoennike oh, sorry. Is that data presented in Eloverblik in HASS today? I can't seem to find it.

runemoennike commented 2 years ago

No it's not presented as of now. This issue is discussing the possibility of adding prices, but that's not possible to do with the data from Eloverblik alone.

JonasPed1 commented 2 years ago

I will see if I can find the time to query the "get charges" endpoint soon and see if the fees and tariffs returned is of any value.

runemoennike commented 2 years ago

I was made aware of another plugin that pulls prices from Nordpool, the market where the supplier buys the electricity from: https://github.com/custom-components/nordpool

In theory, it should be possible to combine the data from Nordpool with the data from Eloverblik to calculate the exact kWh price.

Langthjem commented 2 years ago

I have successfully achieved the wanted behavior by using the Nordpool integration suggested by @runemoennike.