English
English
简体中文
日本語
pdf-icon

Unit ToF Home Assistant Integration

This tutorial will introduce how to integrate the Unit ToF high-precision laser ranging sensor into Home Assistant to achieve non-contact distance monitoring.

Preparation

Note

Note
Because Unit ToF is only a standalone sensor platform, an additional main controller (such as Atom series, Stamp series, Stick series, Core/Basic series, etc.) is required to integrate it into Home Assistant.

Learn

The I²C component needs to be enabled in the ESPHome configuration:

# Example configuration entry for ESP32
i2c:
  sda: GPIOXX
  scl: GPIOXX
  scan: true

The GPIO pins here will vary depending on the main controller used. For example, using Atom Lite as the main controller:

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

Unit ToF configuration example:

yaml
1 2 3 4 5 6
sensor:
  - platform: vl53l0x
    name: "VL53L0x Distance"
    address: 0x29
    update_interval: 60s
    long_range: true

After saving the configuration file, compiling, and uploading the firmware, the device can be added to the Home Assistant integration.

On This Page