Hi all. I’m new into Home Assistant. Just switching from Domoticz as I move house and decide to start from scratch in HA.
I have successfully set HA and communications through MQTT (mosquitto) for some testing sensors and switches but found an issue with pollution sensor connected to D1 mini with AFE firmware.
In MQTT topic I’m receiving
{‘PM25’:‘21’,‘PM10’:‘22’}
configuration.yaml
sensor weather:
platform: mqtt
name: “Pollution”
state_topic: “/weather/HPMA115S0/all”
unit_of_measurement: “mg/m3”
this is what AFE firmware declare:
String JSON {PM25: Intiger, PM10: Intiger}
Could someone give me a hint of how the sesnor_attribute should look like, please?
I would like to collect separate value for each PM - 2.5 and 10
Many thanks.
Regards
Mario
tschaban
(Tschaban-A)
December 26, 2019, 10:30pm
2
Hi Mario,
AFE Firmware T6 v2
below is an example with Bme280, bh1750 and honeywell hpma115s0
assuming
mqtt topic for BH1750 sensor is : bh1750
mqtt topic for HPMA sensor is : hpma
mqtt topic for BME280 sensor is : bme
the firmware can handle BME680 and AS3935 sensor which additional params.
sensor:
- platform: mqtt
name: "Light level"
state_topic: "bh1750"
unit_of_measurement: "lux"
value_template: '{{ value_json["illuminance"].value }}'
- platform: mqtt
name: "PM2.5"
state_topic: "hpma"
value_template: '{{ value_json["PM25"].value }}'
unit_of_measurement: "μg/m3"
- platform: mqtt
name: "PM10"
state_topic: "hpma"
value_template: '{{ value_json["PM10"].value }}'
unit_of_measurement: "μg/m3"
- platform: mqtt
name: "Temp"
state_topic: "bme"
value_template: '{{ value_json["temperature"].value }}'
unit_of_measurement: "°C"
- platform: mqtt
name: "Humidity"
state_topic: "bme"
value_template: '{{ value_json["humidity"].value }}'
unit_of_measurement: "%"
- platform: mqtt
name: "Pressure"
state_topic: "bme"
value_template: '{{ value_json["pressure"].value }}'
unit_of_measurement: "hpa"
- platform: mqtt
name: "Relative pressure"
state_topic: "bme"
value_template: '{{ value_json["relativePressure"].value }}'
unit_of_measurement: "hpa"
- platform: mqtt
name: "Dew Point"
state_topic: "bme"
value_template: '{{ value_json["dewPoint"].value }}'
unit_of_measurement: "°"
- platform: mqtt
name: "Heat Index"
state_topic: "bme"
value_template: '{{ value_json["heatIndex"].value }}'
unit_of_measurement: "°"
Cheers!
Thanks Adrian
After upgrading your firmware to 2.0 now is working perfectly. So that it looks like v 1.0 had a bug, isn’t it?