??? tip "This feature is included only in tasmota32
and tasmota-sensors
binaries"
When [compiling your build](Compile-your-build) add the following to `user_config_override.h`:
```c++
#ifndef USE_BH1750
#define USE_BH1750 // [I2cDriver11] Enable BH1750 sensor (I2C address 0x23 or 0x5C) (+0k5 code)
#endif
```
The BH1750 is a digital ambient light sensor module which uses I2C to communicate. The BH1750 provides you with a digital value in lux (Lx) over a range of 1 - 65535 lx. See datasheet for more information.
BH1750 | ESP |
---|---|
GND | GND |
VCC | 3.3V |
SDA | GPIOx |
SCL | GPIOy |
In the Configuration -> Configure Module page assign:
- GPIOx to
I2C SDA
- GPIOy to
I2C SCL
After a reboot the driver will detect BH1750 automatically and display Illuminance.
Sensor sends a tele/%topic%/SENSOR
JSON response:
{"Time":"2019-11-03T20:45:37","BH1750":{"Illuminance":79}}