Last active
November 28, 2022 07:45
-
-
Save xangin/86db5887d4a82549f7cc9ea88246d5b6 to your computer and use it in GitHub Desktop.
ESPhome IKEA PM2.5 sensor and DHT22 code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: "12345678" | |
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 | |
- platform: wifi_signal | |
name: "WiFi Signal" | |
update_interval: 60s | |
binary_sensor: | |
- platform: status | |
name: "WiFi Status" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment