本章节介绍将 Unit DLight 数字环境光检测传感器集成至 Home Assistant 的配置方法与实操步骤。
Unit DLight 是单独的传感器平台,需要额外的主控设备(如 Atom 系列、Stamp 系列, Stick 系列,Core/Basic 系列等)才能集成至 Home Assistant。
# 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 后:
