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 rain sensor _TZ3210_tgvtvdoc #3656

Merged
merged 8 commits into from
Feb 26, 2025

Conversation

prairiesnpr
Copy link
Collaborator

@prairiesnpr prairiesnpr commented Dec 30, 2024

Proposed change

Adds: _TZ3210_tgvtvdoc

Based on: #3475
Closes: #3249

Requires a resolution to zigpy/zha#327

Additional information

Requires: #3643

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 Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.97%. Comparing base (ff5bf0b) to head (d887438).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #3656   +/-   ##
=======================================
  Coverage   90.96%   90.97%           
=======================================
  Files         327      328    +1     
  Lines       10608    10619   +11     
=======================================
+ Hits         9650     9661   +11     
  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 Jan 16, 2025
@Fredyy90
Copy link

I just tried your chages as a custom quirk in HASS looks like the battery state isn't working with it.

@prairiesnpr
Copy link
Collaborator Author

I just tried your chages as a custom quirk in HASS looks like the battery state isn't working with it.

I didn't implement the battery, what type of battery does it use?

@Fredyy90
Copy link

it has an internal battery thats charaged via solar, i think its a percentage value on tuya datapoint 4

@prairiesnpr
Copy link
Collaborator Author

it has an internal battery thats charaged via solar, i think its a percentage value on tuya datapoint 4

I'm away from PC today, you could try adding .tuya_battery(dp_id=4)

@prairiesnpr prairiesnpr force-pushed the add-rain-_TZ3210_tgvtvdoc branch from cbe1574 to ca7a3d5 Compare January 25, 2025 12:45
@prairiesnpr prairiesnpr force-pushed the add-rain-_TZ3210_tgvtvdoc branch from 9b2f241 to 9811ed9 Compare February 1, 2025 17:27
@prairiesnpr prairiesnpr force-pushed the add-rain-_TZ3210_tgvtvdoc branch from 9811ed9 to 85dd098 Compare February 16, 2025 04:55
@prairiesnpr prairiesnpr force-pushed the add-rain-_TZ3210_tgvtvdoc branch from 85dd098 to 9a8d178 Compare February 17, 2025 01:35
@prairiesnpr prairiesnpr marked this pull request as ready for review February 22, 2025 16:15
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.

Seems also fine otherwise

@TheJulianJES TheJulianJES added the smash This PR is close to be merged soon label Feb 24, 2025
state_class=SensorStateClass.MEASUREMENT,
unit=UnitOfElectricPotential.MILLIVOLT,
entity_type=EntityType.STANDARD,
fallback_name="Rain intensity",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, we might wanna change this to "Voltage" to reflect the HA name, since that's what HA will use.
But not important for now, as it won't be used.

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.

thanks!

@TheJulianJES TheJulianJES changed the title Add Tuya rain sensor - _TZ3210_tgvtvdoc Add Tuya rain sensor _TZ3210_tgvtvdoc Feb 26, 2025
@TheJulianJES TheJulianJES merged commit e824f31 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
smash This PR is close to be merged soon Tuya Request/PR regarding a Tuya device
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Device Support Request] Tuya rainsensor TS0207_TZ3210_tgvtvdoc
3 participants