Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tuya mmWave radar 5.8GHz, ZY_HPS01 _TZE204_ex3rcdha #3887

Merged
merged 4 commits into from
Feb 26, 2025

Conversation

prairiesnpr
Copy link
Collaborator

Proposed change

Adds Tuya mmWave radar 5.8GHz, ZY_HPS01 _TZE204_ex3rcdha

Based on: /~https://github.com/Koenkk/zigbee-herdsman-converters/blob/6c3d7e2aa1fba6f6342baea21e5b3bbd3688cb0e/src/devices/tuya.ts#L13228

Additional information

Closes: #3309

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

Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.00%. Comparing base (b070528) to head (c5e8b60).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #3887   +/-   ##
=======================================
  Coverage   91.00%   91.00%           
=======================================
  Files         328      328           
  Lines       10651    10652    +1     
=======================================
+ Hits         9693     9694    +1     
  Misses        958      958           

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

@TheJulianJES TheJulianJES added the Tuya Request/PR regarding a Tuya device label Feb 20, 2025
Comment on lines +1362 to +1383
.tuya_number(
dp_id=111,
attribute_name="breath_detection_min",
type=t.uint16_t,
min_value=0,
max_value=600,
step=10,
unit=UnitOfLength.CENTIMETERS,
translation_key="breath_detection_min",
fallback_name="Breath detection min",
)
.tuya_number(
dp_id=112,
attribute_name="breath_detection_max",
type=t.uint16_t,
min_value=0,
max_value=600,
step=10,
unit=UnitOfLength.CENTIMETERS,
translation_key="breath_detection_max",
fallback_name="Breath detection max",
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, these don't have the "distance" device class, but still centimeters as the unit. Is that correct?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be missing for others as well. We should add all of these in another PR.

# Conflicts:
#	tests/test_tuya_motion.py
#	zhaquirks/tuya/tuya_motion.py
Copy link
Collaborator

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the conflict. We should add the device classes for the distance entities in another PR, as they seem to be missing for quite a few entities.

@TheJulianJES TheJulianJES merged commit 3b8b703 into zigpy:dev Feb 26, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tuya Request/PR regarding a Tuya device
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Device Support Request] TZE204_ex3rcdha presence and lux sensor
2 participants