smoothed_sensor
is a custom Home Assistant integration that creates a smoothed version of an existing sensor using exponential moving average (EMA).
This is useful when:
- The original sensor is noisy or updates irregularly.
- You want a time-weighted mean that reflects a decayed average rather than instantaneous values.
- You need a smoother input for automations or PID controllers.
The integration exposes:
- Smoothed Sensor → the calculated EMA value.
- Source Value Sensor → the raw source reading used in the most recent calculation (for debugging/monitoring).
- UI-based setup (no YAML required).
- Adjustable decay time (in minutes) to tune how quickly the EMA responds to changes.
- Works with any numeric sensor.
- Friendly unique IDs so sensors survive restarts and renaming.
- Ready for HACS auto-updates.
- Go to HACS → Integrations → Custom Repositories.
- Add this repository:
https://github.com/PascalGodin/ha-smoothed-sensor with category: Integration. - Search for and install Smoothed Sensor.
- Restart Home Assistant.
- Copy the
custom_components/smoothed_sensor
folder into your Home Assistantcustom_components
directory. - Restart Home Assistant.
- In Home Assistant, go to Settings → Devices & Services → Add Integration.
- Search for Smoothed Sensor.
- Select:
- Source sensor → the entity you want to smooth.
- Decay time (minutes) → how quickly past values decay in importance.
- Done! A new sensor will be created with the smoothed values.
If you have a noisy temperature sensor that spikes with every update:
- Raw sensor:
sensor.outdoor_temp
- Smoothed sensor:
sensor.outdoor_temp_smoothed
This smoothed version can then be used in automations, dashboards, or PID controllers.
- A decay time of 10 minutes means old values halve in influence every ~10 minutes.
- If you change the decay time in the UI, the integration will recalculate automatically.
- The source value sensor is available for debugging but optional to use.
Issues and PRs welcome!
- Repo: ha-smoothed-sensor
- License: MIT