Skip to content

How do I add multiple i2c bus? #117

@tommycloud

Description

@tommycloud

I'm trying to use Roode in my ESP32 and it works very good, but I also need to add an BH1750 Illuminance sensor which need i2c bus too, when I'm trying to define the i2c bus for both Roode and BH1750 I got this error note 'Too many candidates found for 'i2c_id' type 'i2c::I2CBus'', and if I only define the i2c bus for one device, then only the defined one will work.
So how could I use multiple i2c devices while I'm using Roode.
Thanks

Below is part of my .yaml
i2c:

  • sda: 21
    scl: 22

  • id: bus_a
    sda: 2
    scl: 15

vl53l1x:
roode:

sensor:

  • platform: bh1750
    name: "BH1750 Illuminance"
    address: 0x23
    i2c_id: bus_a
    update_interval: 2s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions