I had a requirement to have a USB powered sensor (due to the frequency of measurements). Having already been using the M5Stack as a Bluetooth Proxy for some blinds I thought I’d see whether this was an appropriate platform.
The answer was, of course, yes as there are a variety of sensors that simply plug into the Grove port and can be addressed by I2C.
In this case I went with the Env Pro with BME688 sensor which came with the connecting cable. Picture of the sensor
Connect the Sensor to the M5Stack with the supplied cable.
Connect the M5Stack to you computer with USBC cable (has to be a data cable).
Open ESPHome and Add new device and prepare for first time use.
After you’ve got it added to HA then use the following yaml for a start.
Hi Dan, short question… How do you implement the gas sensor for usefull readings? Is there a possibility to read the air quality index directly out of the chip? Warm regards Thomas
I just started working on this and this is what I have so far. I got most of this by spending a lot of time with Gemini 2.5 Pro, so…not sure it’s all functional yet.
# Sensoren von der bme68x_bsec2_i2c Komponente
- platform: bme68x_bsec2
bme68x_bsec2_id: env_pro_bme_core
temperature:
name: "${upper_devicename} ENV Pro Temperatur"
id: env_pro_temperature
filters: [ median ]
pressure:
name: "${upper_devicename} ENV Pro Luftdruck"
id: env_pro_pressure
filters: [ median ]
humidity:
name: "${upper_devicename} ENV Pro Luftfeuchtigkeit"
id: env_pro_humidity
filters: [ median ]
iaq:
name: "${upper_devicename} ENV Pro IAQ"
id: env_pro_iaq
filters: [ median ]
on_value:
- component.update: iaq_classification_id
iaq_static:
name: "${upper_devicename} ENV Pro Static IAQ"
id: env_pro_static_iaq
filters: [ median ]
on_value:
- component.update: static_iaq_classification_id
co2_equivalent:
name: "${upper_devicename} ENV Pro eCO2"
id: env_pro_eco2
filters: [ median ]
breath_voc_equivalent:
name: "${upper_devicename} ENV Pro bVOC"
id: env_pro_bvoc
filters: [ median ]
gas_resistance:
name: "${upper_devicename} ENV Pro Gaswiderstand"
filters: [ median ]
# update_interval: 60s # Globales Sendeintervall an HA für diese Sensoren (Standard ist 60s)
text_sensor:
- platform: bme68x_bsec2
bme68x_bsec2_id: env_pro_bme_core
iaq_accuracy:
name: "${upper_devicename} ENV Pro IAQ Genauigkeit"
id: env_pro_iaq_accuracy_text
- platform: template
name: "${upper_devicename} ENV Pro IAQ Klassifikation"
id: iaq_classification_id
icon: "mdi:leaf"
lambda: |-
if (!id(env_pro_iaq).has_state()) { return {"Kalibrierung..."}; }
int iaq_value = id(env_pro_iaq).state;
if (iaq_value <= 50) { return {"Ausgezeichnet"}; }
else if (iaq_value <= 100) { return {"Gut"}; }
else if (iaq_value <= 150) { return {"Leicht verschmutzt"}; }
else if (iaq_value <= 200) { return {"Mäßig verschmutzt"}; }
else if (iaq_value <= 250) { return {"Stark verschmutzt"}; }
else if (iaq_value <= 350) { return {"Sehr stark verschmutzt"}; }
else if (iaq_value > 350) { return {"Extrem verschmutzt"}; }
else { return {"Fehler"}; }
update_interval: never
- platform: template
name: "${upper_devicename} ENV Pro Static IAQ Klassifikation"
id: static_iaq_classification_id
icon: "mdi:leaf-map"
lambda: |-
if (!id(env_pro_static_iaq).has_state()) { return {"Kalibrierung..."}; }
int iaq_value = id(env_pro_static_iaq).state;
if (iaq_value <= 50) { return {"Ausgezeichnet (s)"}; }
else if (iaq_value <= 100) { return {"Gut (s)"}; }
else if (iaq_value <= 150) { return {"Leicht verschm. (s)"}; }
else if (iaq_value <= 200) { return {"Mäßig verschm. (s)"}; }
else if (iaq_value <= 250) { return {"Stark verschm. (s)"}; }
else if (iaq_value <= 350) { return {"Sehr stark v. (s)"}; }
else if (iaq_value > 350) { return {"Extrem verschm. (s)"}; }
else { return {"Fehler (s)"}; }
update_interval: never