Add BH1750 on ESP32 D1 mini instaled as bluetooth proxy

Hello. I need some advice please. I have an esp32 D1 mini installed as a bluetooth proxy, but I don’t know if I can add the BH1750 sensor to yaml. Can you help me with this? Well thank you.

which will give me this link here as the first result:

but I was already thinking about adding the installed esp32 as a bluetooth proxy to the yaml code for communication with the bh1750. when I have an esp32, it is normally set up via esphome, so I know how and it works for me. but I don’t know if the combination of bluetooth proxy and bh1750 on one esp32 will work for me. We understand each other?

Unless Bluetooth somehow consumes the two I2C pins you need for the BH1750, it should be fine.
For your information, these BH1750 sensors are doing the job for my home, right now. Nice is that they come with jumper wires and pins already. Easy to connect and looks good outside a plastic project box or custom 3D printed box.

great, thanks for the confirmation. Can you please show me your yaml code? and also the connection to the pins? thank you

Mine is on a Wemos D1 mini clone / ESP8266. So the pin assignments won’t be the same for you, since you’re using an ESP32 board.

Essentially, there are four pins to connect:
GROUND / GND - always a necessary connection
VCC / 3V3 - positive DC power at 3.3VDC
SCL - I2C serial clock, used to time data bits
SDA - I2C serial data, used to provide data bits

Now, as I mentioned, your pin assignments for SCL and SDA will definitely be different, because you are using an ESP32 board. Here is an excellent page providing ESP32 pin assignments, and here is another page specifically regarding I2C pin assignments.

  scl: D1
  sda: D2
  scan: True
  - platform: bh1750
    id:   "ambient_light"
    name: "Ambient Light"
    address: 0x23
    update_interval: 30s
    accuracy_decimals: 0

and do you have a bluetooth proxy set on your 8266 board? because this is key fact. is it possible to add other sensors etc. in addition to the installed bluetooth proxy?on 8266 I can install BH1750 without problems as I wrote. but I can’t install yaml on the ESP32 with bluetooth proxy when I insert exactly the part of the code you sent me.

If you used D1 and D2 for the SCL and SDA pin assignments, that’s your issue. You should PROBABLY use GPIO21 and GPIO22. You’d have to look at your exact board to determine where those pins are, so you can connect to them. The second link in my post above will explain why those two GPIO pins are suggested.

Did you check the link (and read the content)?

within less than 10 seconds you can copy the needed yaml’s and get free pin suggestions on top of it :cupcake:

# Example configuration entry for ESP32
  sda: 21
  scl: 22

  - platform: bh1750
    name: "BH1750 Illuminance"
    address: 0x23

No, simply because esp82xx doesn’t have the bluetooth onboard :bulb:

Yes, check the docs at as for now you probably make use of esphome but didn’t quite grasp the idea behind it yet (mix and match of sensors, switches, etc.)

I’m wondering if the OP ever got those four pins connected and working…