Unit TMOS PIR 组件用于读取人体存在和活动状态。
| 项目 | 信息 |
|---|---|
| 产品名称 | Unit TMOS PIR |
| SKU | U185 |
| 主要功能 | 人体存在和运动检测 |
| 通信接口 | I2C |
| 默认 I2C 地址 | 0x5A |
| ESPHome 组件 | sths34pf80(外部组件) |
| ESPHome 版本要求 | 2026.2.2 及以上 |
在 YAML 文件中添加 External Components 配置,加载 STHS34PF80 传感器驱动。
external_components:
- source: github://m5stack/esphome-yaml/components
components: [sths34pf80]
refresh: 0s 添加 sths34pf80 Sensor Platform,可发布存在量、运动量和芯片温度;presence、motion 和 temperature 均为可选项。pres_flag 和 mot_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 | 存在检测阈值,范围 0–32767,默认 200。 |
motion_threshold | 运动检测阈值,范围 0–32767,默认 200。 |
presence_hysteresis | 存在检测迟滞,范围 0–255,默认 50。 |
motion_hysteresis | 运动检测迟滞,范围 0–255,默认 50。 |
odr | 芯片内部输出数据率,范围 1–8,默认 8(30 Hz)。 |
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