Wouldn’t it be great and easy to implement if you could simply specify a low-pass filter for entities?
A plug cannot consume more than 4000 watts and my living room never has more than 50°C room temperature.
Nevertheless, there are always values that mess up my statistics.
If you were to give each sensor a maximum value and just cut everything above, you could exclude these spikes.
…and its a very common issue if I search the internet.
Cheers
Christian
# Example configuration.yaml entry
sensor:
- platform: filter
name: "filtered realistic humidity"
entity_id: sensor.realistic_humidity
filters:
- filter: outlier
window_size: 4
radius: 4.0
- filter: lowpass
time_constant: 10
precision: 2
- platform: filter
name: "filtered realistic temperature"
entity_id: sensor.realistic_temperature
filters:
- filter: outlier
window_size: 4
radius: 2.0
- filter: lowpass
time_constant: 10
- filter: time_simple_moving_average
window_size: "00:05"
precision: 2
Add a state class to it shows up in the LTS as well.