Skip to content

Conversation

@a-gal
Copy link

@a-gal a-gal commented Dec 13, 2025

…zeci, _TZE284_1lvln0x6)

Proposed change

This adds support for a battery powered iHseno Tuya Human Presence Sensor

It's a port of this z2m converter.

Additional information

Device diagnostics

zha-01JYEQ11XP51H3NKH2CQYGCT58-_TZE284_debczeci TS0601-8ca1e243d10bc471fa8384d5e4306923.json

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works
  • Device diagnostics data has been attached

@codecov
Copy link

codecov bot commented Dec 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.28%. Comparing base (35d1fc1) to head (e90b4e7).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #4568   +/-   ##
=======================================
  Coverage   92.28%   92.28%           
=======================================
  Files         371      371           
  Lines       12158    12163    +5     
=======================================
+ Hits        11220    11225    +5     
  Misses        938      938           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@BCSugoi
Copy link

BCSugoi commented Dec 15, 2025

I can confirm this is working for a "_TZE284_debczeci", but with one modification: the fading time has only three possible settings, 15s, 30s and 60s, rather than the 4 steps (10, 30, 60, 120) in the class TuyaMotionFadeTime. So I added a new class with three steps as shown below, and changed the reference in the code to this one:

`class TuyaMotionFadeTime3step(t.enum8):
"""Tuya motion fade time enum."""

_15_seconds = 0x00
_30_seconds = 0x01
_60_seconds = 0x02`

Also, I'm not sure if we need the "battery_qty=2" entry? Mine works the same whether I include that or not.

The device is working well, although the fade time seems to be a little unpredictable, eg. if it is set at 15 seconds it often takes 30 to 45 seconds. This behavior was tested using a Tuya hub and was the same as in ZHA, so it seems to be the device, not the quirk

For reference, I bought my device on Amazon here:
https://www.amazon.com/IHSENO-Presence-Detector-Automation-Required/dp/B0FHBB4D84
And found it on the manufacturer's website here:
http://ihseno.com/product/html/?195.html

And here is a photo of the inside of the device
iHseno_TZE284_debczeci

@a-gal
Copy link
Author

a-gal commented Dec 15, 2025

15s, 30s and 60s, rather than the 4 steps (10, 30, 60, 120) in the class TuyaMotionFadeTime. So I added a new class with three steps as shown below, and changed the reference in the code to this one:

Good to know, I wasn't sure about fourth value. I'll fix this.

Also, I'm not sure if we need the "battery_qty=2" entry? Mine works the same whether I include that or not.

It's just an informational value, AFAIK, it doesn't do anything but define "Battery quantity" displayed in properties.

@a-gal a-gal force-pushed the port-tuya-presence-_TZE284_debczeci branch from ce64d31 to e90b4e7 Compare December 15, 2025 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants