This tutorial shows how to use the Unit TMOS PIR presence sensor with an AtomS3R controller and integrate it into Home Assistant to monitor human presence and motion status in real time.

CONTINUE.

New Device Setup to enter the device creation wizard.
NEXT.
ESP32S3.
SKIP to skip the encryption key setup.
EDIT to open the YAML editor and customize the device configuration.
Add an External Components block in the YAML file to load the STHS34PF80 sensor driver.
external_components:
- source: github://m5stack/esphome-yaml/components
components: sths34pf80
refresh: 0s Add the I2C component to configure the communication pins between Unit TMOS PIR and AtomS3R.
i2c:
sda: GPIO2
scl: GPIO1
scan: true Add the Sensor component to enable presence and motion detection.
sensor:
- platform: sths34pf80
pres_flag:
name: "TMOS Presence Detected"
mot_flag:
name: "TMOS Motion Detected"
presence_threshold: 200
presence_hysteresis: 50
motion_hysteresis: 50
odr: 8
update_interval: 1s Main parameter description:
| Parameter | Value | Description |
|---|---|---|
presence_threshold | 200 | Presence detection threshold. Higher values make the sensor less sensitive. |
presence_hysteresis | 50 | Hysteresis for presence detection to avoid frequent toggling. |
motion_hysteresis | 50 | Hysteresis for motion detection. |
odr | 8 | Output data rate (Hz). Supported values: 0.25 / 0.5 / 1 / 2 / 4 / 8 / 15 / 30. |
update_interval | 1s | Sensor state update interval in Home Assistant. |
SAVE in the top right, then click INSTALL.
Manual Download.
Download and choose Factory format (Previously Modern) to save the firmware file locally.
CONNECT.

INSTALL.

Settings > Devices & Services to open the integration management page.
Discovered section, find the Unit TMOS PIR device, click CONFIGURE, and follow the wizard to complete the setup.
pres_flag (presence detection) and mot_flag (motion detection), along with their real-time states.
