mampfes / ha_epex_spot

Adds EPEX Spot data to Home Assistant.
MIT License
130 stars 19 forks source link

unit or calculation for net price wrong #47

Closed aSauerwein closed 11 months ago

aSauerwein commented 11 months ago

Hi,

i just noticed that either the unit or the calculation for net price is wrong by factor 10.

image

as an example: current price: 10.46EUR/MWh == 1046 ct/MWh == 1,046 ct/kWh

so either the unit of the sensor should be changed to ct/kWh or the the price has to be multiplied by 10.

I think ct/kWh has been done on purpose here: https://github.com/mampfes/ha_epex_spot/blob/5bdf4228b60068c1f42272ee4decbb7526b5dcac/custom_components/epex_spot/SourceShell.py#L128

so it would be the easiest to just change the unit here: https://github.com/mampfes/ha_epex_spot/blob/5bdf4228b60068c1f42272ee4decbb7526b5dcac/custom_components/epex_spot/sensor.py#L95

mampfes commented 11 months ago

Thanks! This is a copy/paste error from the big refactoring.

aSauerwein commented 11 months ago

thank you for the quick fix. looking good now!

image