For the Statistics Sensor in Home Assistant, the state_characteristic determines how the sensor's value is calculated over the given time window (max_age). The possible options are:
Possible state_characteristic Options:
mean – Average value over the period.
min – Minimum value in the period.
max – Maximum value in the period.
median – Median value in the period.
sum – Sum of all values in the period.
last – Most recent value in the period.
first – First value in the period.
change – Difference between the first and last value.
stddev – Standard deviation of values.
variance – Variance of values.
Best Choice for Capaciteitstarief (Capacity Tariff) in Belgium
For the capacity tariff (which is based on the highest average power consumption over 15-minute intervals in a month), you should use:
mean (average) – This is the correct choice because the capacity tariff is calculated based on the average power consumption over 15-minute windows.
However, if you want to estimate the worst-case scenario (to avoid surprises in billing), you could also consider:
max – To see the peak 15-minute average (but this might overestimate).
sum – If you want to track total consumption (but not directly relevant for capacity tariff).
Recommended Configuration:
platform: statistics
name: "P1 Meter Power 15min Average"
unique_id: p1_meter_power_15min_avg
entity_id: sensor.p1_meter_power_consumption
state_characteristic: mean # Correct for capacity tariff
max_age:
minutes: 15
precision: 0
Why mean is the best choice?
- The capacity tariff is based on the highest 15-minute average power consumption in a month.
- Using
mean ensures you track the correct metric that your energy provider uses for billing.
- If you use
max, you might get an inflated value (since it picks the highest single reading, not the average).
Would you like additional optimizations (e.g., tracking the highest 15-minute average per month)?