You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- platform: nordpool# Should the prices include vat? Default TrueVAT: True# What currency the api fetches the prices in# this is only need if you want a sensor in a non local currencycurrency: "EUR"# Option to show prices in cents (or the equivalent in local currency)price_in_cents: false# Helper so you can set your "low" price# low_price = hour_price < average * low_price_cutofflow_price_cutoff: 0.95# What power regions your are interested in# Possible values: "DK1", "DK2", "FI", "LT", "LV", "Oslo", "Kr.sand", "Bergen", "Molde", "Tr.heim", "Tromsø", "SE1", "SE2", "SE3","SE4", "SYS", "EE"region: "SE3"# How many decimals to use in the display of the priceprecision: 3# What the price should be displayed in default# Possible values: MWh, kWh and Wh# default: kWhprice_type: kWh# This option allows the usage of a template to add a tariff.# now() always refers start of the hour of that price.# this way we can calculate the correct costs add that to graphs etc.# The price result of the additional_costs template expects this additional cost to be in kWh and not cents as a float# default {{0.0|float}}additional_costs: "{{0.0|float}}"
Describe the bug
The value calculated under "Mean" is not the mean value, mean and average are almost always the same. The value calculated is probably the Median, the center of all values.
When both the daily average and the current spot price is negative, _price_percent_to_average is not calulated correctly. An even lower negative spot price will make _price_percent_to_average larger.
I bumped into using mean incorrect due to its naming.
To avoid confusion for users, I kindly request that the attribute name be updated from “mean” to “median” to accurately reflect its function. Additionally, I recommend providing a clear notification about this change in the update notes to inform users who rely on the “mean” attribute, ensuring a smooth transition.
Version of the custom_component
0.0.14
Homeassistant version
2023.9.3
Configuration
Describe the bug
The value calculated under "Mean" is not the mean value, mean and average are almost always the same. The value calculated is probably the Median, the center of all values.
If i run the values for today (24/8) in python:
state_class: total
average: 1.2279166666666668
off_peak_1: 0.30575
off_peak_2: 2.0285
peak: 1.5758333333333332
min: 0.276
max: 3.851
mean: 0.435
unit: kWh
currency: SEK
country: Sweden
region: SE3
low_price: true
price_percent_to_average: 0.3583305055989141
today:
Output from Pandas DataFrame:
count 24.000000
mean 1.227917
std 1.141570
min 0.276000
25% 0.321500
50% 0.435000
75% 2.309500
max 3.851000
median 0.435
The average is equal to the mean at 1.2279, but the mean is probably mislabelled and should be called median instead.
Debug log
The text was updated successfully, but these errors were encountered: