-
Notifications
You must be signed in to change notification settings - Fork 908
Add quirk for EfektaLab EFEKTA_iAQ3 air quality sensor with VOC #4469
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
base: dev
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #4469 +/- ##
==========================================
+ Coverage 92.24% 92.28% +0.04%
==========================================
Files 369 370 +1
Lines 12094 12158 +64
==========================================
+ Hits 11156 11220 +64
Misses 938 938 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
puddly
left a comment
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.
Thanks! I've left a few tiny comments regarding attributes
zhaquirks/efekta/iaq3.py
Outdated
| ) | ||
|
|
||
|
|
||
| class AnalogInputCluster(CustomCluster, AnalogInput): |
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.
Can you rename this to something manufacturer-specific?
zhaquirks/efekta/iaq3.py
Outdated
| """Intercept present_value updates and relay to VOC cluster.""" | ||
| super()._update_attribute(attrid, value) | ||
| if attrid == self.PRESENT_VALUE and value is not None: | ||
| self.endpoint.voc_level._update_attribute(MEASURED_VALUE, value) |
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.
Attribute IDs should be pulled from the attribute definition as opposed to relying on a global constant: EmulatedVOCMeasurement.AttributeDefs.measured_value.id
zhaquirks/efekta/iaq3.py
Outdated
| 30, # min_interval: 30 seconds | ||
| 600, # max_interval: 10 minutes | ||
| 1.0, # reportable_change: 1 unit |
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.
| 30, # min_interval: 30 seconds | |
| 600, # max_interval: 10 minutes | |
| 1.0, # reportable_change: 1 unit | |
| min_interval=30, | |
| max_interval=600, | |
| reportable_change=1.0, |
zhaquirks/efekta/iaq3.py
Outdated
| """Bind cluster and configure reporting on the physical AnalogInput cluster.""" | ||
| result = await self.endpoint.analog_input.bind() | ||
| await self.endpoint.analog_input.configure_reporting( | ||
| AnalogInputCluster.PRESENT_VALUE, |
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.
| AnalogInputCluster.PRESENT_VALUE, | |
| AnalogInputCluster.AttributeDefs.present_value.id, |
Fixed and pushed, thanks for review |
Proposed change
Add quirk for EfektaLab EFEKTA_iAQ3 air quality sensor with comprehensive configuration support
Features:
Additional information
-
Device diagnostics
zha-01JA3XGQ4YQEGYDX751RBJAC66-EfektaLab EFEKTA_iAQ3-3a3ee82feee43daec2da2628e7580eda-5.json
Checklist
pre-commitchecks pass / the code has been formatted using Black