Lyr3x / Roode

A reliable smart home people counter based on VL53L1X and ESPHome
The Unlicense
149 stars 41 forks source link

How do I add multiple i2c bus? #117

Open tommycloud opened 2 years ago

tommycloud commented 2 years ago

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:

vl53l1x: roode:

sensor:

sunshine-hass commented 2 years ago

Enable logging

logger: level: INFO

i2c: sda: 21 scl: 22 scan: true id: bus_a

roode: id: roode_platform i2c_address: 0x29 update_interval: 100ms calibration: max_threshold_percentage: 85 min_threshold_percentage: 5 roi_calibration: true

manual:

sensor_mode: 2

roi_height: 16

roi_width: 6

manual_threshold: 1300

timing_budget: 100

invert_direction: true restore_values: false

button:

light:

output:

switch:

- platform: restart

name: $friendly_name Restart

binary_sensor:

sensor: