Tuya Presence Automation with HomeAssistant
This is a guide on my experience with a few Tuya Presence sensor variants & Automation setup guide with HomeAssistant.
Tuya Presence Sensor Variants
- 24G Presence sensor - WiFi version (✓ Tested)
- 24G Presence sensor - Zigbee version
- 5.8G Presence sensor - WiFi version
- 5.8G Presence sensor - Zigbee version (✓ Tested)
### Usage Findings: Caveat: As I only tested half of the variant (2 out of 4), below are opinions for your own judgement.
1. 24G Presence sensor - WiFi version
- 24G version has issue on data passthrough to homeassistant, you will get “motion detected” (instead of the wanted “presence detected”)
- Performance very inconsistent expecially after Q4 2024. After device update, detector sometime just stop working or random detection of motion when nothing is there.
2. 5.8G Presence sensor - Zigbee version
- 5.8G version is recommended as data passthrough to homeassistant is the wanted “presence detected”
- Presence detection is accurate and better refined over time.
Prior Setup
- Tuya sensor hardware installation
- Add device in homeassistant via Tuya (Cloud)
- You will find related entities on your added device:
- 24G Presence sensor - WiFi version
- One sensor = “motion”
- Config for far detection & sensitivity (recommend to set it in mobile app)
- Closetest target distance (not useful)
- 5.8G Presence sensor - Zigbee version
- One sensor = “presence”
- No config, set it in mobile app
- 24G Presence sensor - WiFi version
Monitoring Graph Setup
- you can use Add CARD > History graph Card configuration
- add all presence and motion sensors
- Adjust Hours to show based on your lifestyle
- This will give you a quick view of presence/ door open close in your house
Automation ON/ OFF
24G Presence sensor - WiFi version
- If your version’s data pattern is accurate, you can use the following automation rule to trigger devices On or OFF.
- Below rules will enable ON trigger < 30s & OFF trigger after absence about __ minutes
- For presence rule:
- From “Any State” to “Detected” For 0 second
- For absence rules:
- From “Any State” to “Detected” For 25 minutes
- From “Any State” to “Clear” For 25 minutes
5.8G Presence sensor - Zigbee version
- Below rules will enable ON trigger < 5s & OFF trigger after absence about 10 minutes
- Caution: OFF trigger too short will be annoying, imagine go take a drink/ toilet break and come back. You get a flickering room.
- For presence rule:
- From “Any State” to “Home” For 2 second
- For absence rules:
- From “Any State” to “Away” For 10 minutes
Night Time Exception
- For some space/ room, you may want to set exception rule where the OFF trigger will not take action e.g. Living Room at night.
- You can use the “And if” rule to set the boundry where OFF trigger will not take action.