pdf-icon

Unit DLight Home Assistant 集成

Unit DLight 是一款数字环境光检测传感器,硬件采用 BH1750FVI 照度传感器 IC ( I2C 接口 ),内置 16bit AD 转换支持 (1 ~ 65535 lx) 照度值检测。具有体积小,功耗低等特点。适用于各种照度检测,光控调节场景。

注意
因为 Unit DLight 是单独的传感器平台,需要额外的主控设备(如 Atom Lite、Core2、CoreS3 等)才能集成至 Home Assistant

配置传感器

需要在 ESPHome 配置中启用I²C组件:

yaml
1 2 3 4 5
# Example configuration entry for ESP32
i2c:
  sda: GPIOXX
  scl: GPIOXX
  scan: true

这里的 GPIO 引脚会因为使用的主控设备不一而不同。比如使用 Atom Lite 作为主控:

yaml
1 2 3 4
# I2C Bus on Grove Port (HY2.0-4P)
i2c:
  sda: GPIO26
  scl: GPIO32

以下是sensor配置范例:

yaml
1 2 3 4 5
sensor:
  - platform: bh1750
    name: "Unit DLight Illuminance"
    address: 0x23
    update_interval: 60s

Dashboard 示例

完成添加至 Home Assistant后:

On This Page