Thanks for share the way!
It’s really easy connect to ESPhome & HA
I also put DHT22 in it, here’s my setup & code:
esphome:
name: ikea-pm25
platform: ESP8266
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
wifi:
ssid: !secret my_ap_ssid
password: !secret my_ap_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Ikea-Pm25"
password: !secret the_ap_password
captive_portal:
uart:
rx_pin: D2
baud_rate: 9600
sensor:
- platform: pm1006
pm_2_5:
name: "PM2.5 sensor"
- platform: dht
pin: D5
temperature:
name: "Temperature"
humidity:
name: "Humidity"
update_interval: 30s