tom1422 / ESPHome-HPMA115S0-Sensor-Component

Integration for the HPMA115S0 Dust and Particle Sensor into ESPHome
5 stars 2 forks source link

Editing ESPHome yaml for setup: Expected a dictionary #1

Closed ionultd closed 2 years ago

ionultd commented 3 years ago

https://i.imgur.com/hGqJKXe.png

tom1422 commented 3 years ago

Forgot to say in the setup that this should be under a sensor tag. See below:

sensor:
  - platform: hpma115s0_esphome
    pm_2_5:
      name: "Particulate Matter <2.5µm Concentration"
      unit_of_measurement: "<2.5µm"
      icon:  "mdi:fan"
    pm_10_0:
      name: "Particulate Matter <10.0µm Concentration"
      unit_of_measurement: "<10.0µm"
      icon: "mdi:fan"
    update_interval: 5s

Also remember to include this near the start of the yaml file:

uart:
  id: uart_bus
  tx_pin: 9
  rx_pin: 10
  baud_rate: 9600

The tx_pin and rx_pin shown above are for the elektor weather station. If you are not using that please update them accordingly. Let me know if this works for you.

ionultd commented 3 years ago

Thank you for that update. It is not seeing the sensor but I believe it may be because I need to connect the TX pin as well as I have only the RX pin connected