I’ve hooked up an ENS160 with AHT21 on board to a D1 mini V3 and written a sketch to get eCO2, tvoc, AQI, temperature and humidity. It’s working fine. Sensor firmware of the ENS160 is 5.4.6.
Then I’ve tried to use it together with ESPhome. The communication is OK, but I do not get values.
As it is working fine with the D1 mini V3 on the breadboard with Arduino code, I don’t think it’s a power issue, spikes or problems like that.
May be the firmware is not compatible with the ESPHome config?
There is a CCS811-sensor on the same breadboard to compare the MOX-sensors. This one is working and the GY-21 is working, too.
That’s my YAML:
sensor:
- platform: ccs811
eco2:
name: "CCS811 eCO2-Wert"
tvoc:
name: "CCS811 tvoc"
address: 0x5A
temperature: temp_gy_21
humidity: hum_gy_21
- platform: htu21d
model: htu21d
temperature:
name: "Temperatur_GY-21"
id: temp_gy_21
humidity:
name: "erf_Luftfeuchte_GY-21"
id: hum_gy_21
- platform: ens160_i2c
eco2:
name: "ENS160 eCO2"
id: ens160_eco2
tvoc:
name: "ENS160 Total Volatile Organic Compounds"
id: ens160_tvoc
aqi:
id: ens160_air_quality_index
name: "ENS160 Air Quality Index"
compensation:
temperature: aht21_temp_office
humidity: aht21_hum_office
- platform: aht10
variant: AHT20
temperature:
name: "Temp Büro"
id: aht21_temp_office
humidity:
name: "rel FL Büro"
id: aht21_hum_office