-
Notifications
You must be signed in to change notification settings - Fork 727
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 pool sensor quirk _TZE200_v1jqz5cy
#3673
base: dev
Are you sure you want to change the base?
Add Tuya pool sensor quirk _TZE200_v1jqz5cy
#3673
Conversation
Fixing pre-commit failures |
zhaquirks/tuya/ts0601_pool_sensor.py
Outdated
# Create a quirks v2 of Tuya's EnchantedDevice as we need Tuya spells | ||
EnchantedDevice.__bases__ = (CustomDeviceV2,) | ||
|
||
|
||
class EnchantedDeviceV2(EnchantedDevice): | ||
"""Updated version of EnchantedDevice based on CustomDeviceV2.""" | ||
|
||
tuya_spell_data_query: bool = True # Enable data query spell |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be done properly when #3661 is implemented. (Although I'd like to avoid duplicating the spell code in that PR if that's possible in a clean way.)
I think this implementation might cause the other tests to break at the moment(?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the implementation so it doesn't conflict with the tests.
_TZE200_v1jqz5cy
Regarding unit validation, we're also working on fixing this: zigpy/zha#327 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #3673 +/- ##
==========================================
+ Coverage 89.85% 89.89% +0.04%
==========================================
Files 322 323 +1
Lines 10379 10424 +45
==========================================
+ Hits 9326 9371 +45
Misses 1053 1053 ☔ View full report in Codecov by Sentry. |
02075aa
to
b657708
Compare
Proposed change
This is an initial implementation of a standalone v2 quirk for _TZE200_v1jqz5cy Tuya Pool Sensor that works without HA or other modifications.
Additional information
What it does:
What it does not do:
All sensors look pretty good to me, and the device on battery runs great. My only concern is chlorine seems to not change, but my CL pool levels are super low.
Suggested next steps:
Checklist
pre-commit
checks pass / the code has been formatted using Black