https://github.com/robmarkcole/hass-kalman-filter
Home-Assistant custom integration adding a 1D Kalman filter
https://github.com/robmarkcole/hass-kalman-filter
home-assistant
Last synced: about 1 year ago
JSON representation
Home-Assistant custom integration adding a 1D Kalman filter
- Host: GitHub
- URL: https://github.com/robmarkcole/hass-kalman-filter
- Owner: robmarkcole
- License: mit
- Created: 2018-06-21T06:01:16.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-12-26T08:30:19.000Z (over 5 years ago)
- Last Synced: 2025-04-30T15:34:02.122Z (about 1 year ago)
- Topics: home-assistant
- Language: Jupyter Notebook
- Homepage:
- Size: 320 KB
- Stars: 11
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HASS-kalman-filter
Home-Assistant custom component adding a [1D Kalman filter](https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python/blob/master/04-One-Dimensional-Kalman-Filters.ipynb). Some experimentation of the `sensitivity` of the filter may be required.
Place the `custom_components` folder in your configuration directory (or add its contents to an existing `custom_components` folder).
Add to your Home-Assistant config:
```yaml
sensor:
- platform: filter
name: "kalman filtered humidity"
entity_id: sensor.simulated_relative_humidity
filters:
- filter: kalman
sensitivity: 0.8
```
Configuration variables:
- **sensitivity**: (Optional, default 0.8) The sensitivity of the filter, which must be a positive number above 0.
## Simulated sensor
I am using a simulated sensor to generate the input data:
```yaml
sensor:
- platform: simulated
scan_interval: 1
name: 'simulated relative humidity'
unit: '%'
period: 20
amplitude: 0
mean: 50
spread: 5
seed: 999
```
I display the raw and filtered readings using a graph:
```yaml
history_graph:
humidity:
entities:
- sensor.simulated_relative_humidity
- sensor.kalman_filtered_humidity
```