
Unit DLight 是一款数字环境光检测传感器,硬件采用 BH1750FVI 照度传感器 IC ( I2C 接口 ),内置 16bit AD 转换支持 (1 ~ 65535 lx) 照度值检测。具有体积小,功耗低等特点。适用于各种照度检测,光控调节场景。
需要在 ESPHome 配置中启用I²C组件:
# Example configuration entry for ESP32
i2c:
sda: GPIOXX
scl: GPIOXX
scan: true这里的 GPIO 引脚会因为使用的主控设备不一而不同。比如使用 Atom Lite 作为主控:
# I2C Bus on Grove Port (HY2.0-4P)
i2c:
sda: GPIO26
scl: GPIO32以下是sensor配置范例:
sensor:
- platform: bh1750
name: "Unit DLight Illuminance"
address: 0x23
update_interval: 60s完成添加至 Home Assistant后:
