LaskaKit / ESP-Vindriktning

Other
84 stars 16 forks source link

ESP home #1

Closed vojtechBohman closed 2 years ago

vojtechBohman commented 2 years ago

Could you show the same integration also for ESP Home? So far I have only basics. For example on_value_range with PM sensor does not work for me.

esphome:
  name: ikea-vindriktning

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: ""

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Ikea-Vindriktning"
    password: ""

captive_portal:

uart:
  rx_pin: GPIO16
  tx_pin: GPIO17
  baud_rate: 9600

sensor:
  - platform: pm1006
    id: "vindriktning_pm"
    pm_2_5:
      name: "Particulate Matter 2.5µm Concentration"
    update_interval: 20s
    #on_value_range:
    #  above: 5
    #  below: 10
    #  then:
    #    - light.turn_on: vindriktning_light_1

switch:
  - platform: gpio
    pin: GPIO12
    name: "Fan"
    id: "vindriktning_fan"

light:
  - platform: neopixelbus
    type: GRB
    variant: WS2812
    pin: GPIO25
    num_leds: 3
    name: "Vindriktning Light"
    id: "vindriktning_light"
petus commented 2 years ago

Hello @vojtechBohman , I found that ESPhome is supporting PM1006 (dust sensor) https://esphome.io/components/sensor/pm1006.html You should just change the GPIO where is UART TX (of PM1006) connected

Konstantin-G commented 2 years ago

Hi, @bruxy70 did add configuration for ESPHome ;)