Closed danielcecil closed 1 month ago
Doh! I should have tinkered more.
FYI just add this to the bottom of the ESPHome config file. Thanks @kloppy
# override the i2c definition in everything-presence-lite-ha.yaml
# to include an id for the bus, also add a second i2c bus which
# does not break the bh1750
i2c:
- id: bus_epl
sda: 21
scl: 22
scan: true
- id: bus_custom
sda: 26
scl: 27
scan: true
# extend the definition for the bh1750 illuminance sensor
# to reference the i2c bus by id, also add a bme280
# environment sensor
sensor:
- id: !extend illuminance_sensor
i2c_id: bus_epl
- id: co2_sensor
i2c_id: bus_custom
platform: scd4x
address: 0x62
update_interval: 30s
co2:
name: "CO2"
Yes that is the correct way for now, in the process of adding it to the docs and hopefully shorten the code a little bit too!
Hi, I cannot seem to get the SCD40 CO2 sensor to work by adding the scd4x component to ESPHome.
https://github.com/EverythingSmartHome/everything-presence-lite/compare/main...danielcecil:everything-presence-lite:main
I tried adding a separate i2c bus to the bh1750 as mentioned by @kloppy in #28 but this didn't seem to have any effect. Since the SCD40 uses a different address I'd prefer to have them both on the same bus anyway.
Sensor is connected to the GPIO pins correctly.
Log: