Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
IKEA vindriktning ESPhome Home Assistant
esphome:
name: vindriktning
platform: ESP8266
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "OTAPASSWORD"
wifi:
ssid: "SSID"
password: "SSIDPASSWORD"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Vindriktning Fallback Hotspot"
password: "APPASSWORD"
captive_portal:
# Ikea Vindriktning PM2.5 sensor
uart:
rx_pin: D2
baud_rate: 9600
sensor:
- platform: pm1006
pm_2_5:
name: "Ikea Vindriktning PM25"
filters:
- sliding_window_moving_average:
window_size: 10
send_every: 10
@RubenKelevra
Copy link

RubenKelevra commented Aug 25, 2021

Hey, thanks for the config!

I would recommend a filter, as the sensor puts out a lot of values in short succession which isn't necessary.

sensor:
  - platform: pm1006
    pm_2_5:
      name: "PM2.5 Bedroom"
      filters:
        - sliding_window_moving_average:
            window_size: 10
            send_every: 10

@GuySie
Copy link
Author

GuySie commented Aug 29, 2021

Thanks, I was unaware you could filter the input this way in esphome! That's a great suggestion!

@hagagit
Copy link

hagagit commented Mar 10, 2022

I think a median or quantile filter is better suited for this type of sensors. They get rid of the outliers. See the core sensor description on the ESPhome documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment