简体中文
English
简体中文
日本語

Unit TMOS PIR ESPHome 组件

Unit TMOS PIR 组件用于读取人体存在和活动状态。

1. 组件简介

项目 信息
产品名称 Unit TMOS PIR
SKU U185
主要功能 人体存在和运动检测
通信接口 I2C
默认 I2C 地址 0x5A
ESPHome 组件 sths34pf80(外部组件)
ESPHome 版本要求 2026.2.2 及以上

2. 组件说明

外部组件引入

在 YAML 文件中添加 External Components 配置,加载 STHS34PF80 传感器驱动。

external_components:
  - source: github://m5stack/esphome-yaml/components
    components: [sths34pf80]
    refresh: 0s

Sensor 与 Binary Sensor 传感器配置

添加 sths34pf80 Sensor Platform,可发布存在量、运动量和芯片温度;presencemotiontemperature 均为可选项。pres_flagmot_flag 会在该平台下创建 Binary Sensor 实体。

sensor:
  - platform: sths34pf80
    presence:
      name: "TMOS Presence"
    motion:
      name: "TMOS Motion"
    temperature:
      name: "TMOS Temperature"
    pres_flag:
      name: "TMOS Presence Detected"
    mot_flag:
      name: "TMOS Motion Detected"
    presence_threshold: 200
    motion_threshold: 200
    presence_hysteresis: 50
    motion_hysteresis: 50
    odr: 8
    update_interval: 1s

主要参数:

参数 说明
presence_threshold 存在检测阈值,范围 032767,默认 200
motion_threshold 运动检测阈值,范围 032767,默认 200
presence_hysteresis 存在检测迟滞,范围 0255,默认 50
motion_hysteresis 运动检测迟滞,范围 0255,默认 50
odr 芯片内部输出数据率,范围 18,默认 8(30 Hz)。

3. 参考案例

yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
external_components:
  - source: github://m5stack/esphome-yaml/components
    components: [sths34pf80]
    refresh: 0s

i2c:
  sda: GPIOXX
  scl: GPIOXX
  scan: true

sensor:
  - platform: sths34pf80
    id: tmos_pir
    presence:
      name: "TMOS Presence"
    motion:
      name: "TMOS Motion"
    temperature:
      name: "TMOS Temperature"
    pres_flag:
      name: "TMOS Presence Detected"
    mot_flag:
      name: "TMOS Motion Detected"
    presence_threshold: 200
    motion_threshold: 200
    presence_hysteresis: 50
    motion_hysteresis: 50
    odr: 8
    update_interval: 1s

4. 相关链接

Page Tools
PDF
On This Page