-
Notifications
You must be signed in to change notification settings - Fork 469
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 maileke air quality detector #1850
base: main
Are you sure you want to change the base?
add maileke air quality detector #1850
Conversation
Duplicate profile check: Passed - no duplicate profiles detected. |
Invitation URL: |
Test Results 65 files 405 suites 0s ⏱️ Results for commit e93d1dd. ♻️ This comment has been updated with latest results. |
Minimum allowed coverage is Generated by 🐒 cobertura-action against e93d1dd |
id = 0x0000, | ||
value_type = data_types.Uint16, | ||
}, | ||
pm1_0 = { |
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.
Are you sure that this attribute is pm1.0? The cluster ID is standard and the attributes are usually MeasuredValue, MinMeasuredValue, MaxMeasuredValue and sometimes 0x0003 for Tolerance.
Especially when you already call the cluster pm2.5, the attributes shouldn't be pm1.0 and so on.
drivers/SmartThings/zigbee-air-quality-detector/profiles/air-quality-detector-maileke.yml
Outdated
Show resolved
Hide resolved
capabilities.veryFineDustHealthConcern, | ||
capabilities.veryFineDustSensor, | ||
capabilities.dustHealthConcern, | ||
capabilities.fineDustSensor, |
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.
Redundant.
end | ||
end | ||
|
||
local function pm2_5_attr_handler(cap,Concern,good,bad) |
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 should be split into separate handlers - IF the device even has pm1.0 and pm10 measurement.
}, | ||
[custom_clusters.pm2_5.id] = { | ||
[custom_clusters.pm2_5.attributes.pm2_5.id] = pm2_5_attr_handler(capabilities.fineDustSensor.fineDustLevel,capabilities.fineDustHealthConcern.fineDustHealthConcern,75,115), | ||
[custom_clusters.pm2_5.attributes.pm1_0.id] = pm2_5_attr_handler(capabilities.veryFineDustSensor.veryFineDustLevel,capabilities.veryFineDustHealthConcern.veryFineDustHealthConcern,100,0), |
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.
What are these values 100 and 0?
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.
Is the comparative value of the level of quality
- id: refresh | ||
version: 1 | ||
categories: | ||
- name: AirQualityDetector |
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.
Without a dashboard
, the device tile would look like a temperature sensor with an icon of an air quality sensor.
end | ||
end | ||
|
||
local maileke_sensor = { |
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.
With a life cycle handler ( lifecycle_handlers
) for init, added or do_configure, you could actually configure the clusters. Without configuration, the device won't send anything or fire messages at a rate of 1 per second.
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 is not a sleep end device
Here's an example of a driver with custom clusters: https://github.com/ldeora/SmartThingsEdgeDrivers/tree/main/IKEA-VINDSTYRKA-TVOC You can see how you can configure them (the laziest way), some naming conventions, how you can change the device tile and much more. This is a very friendly and helpful community where you can discuss these things before you submit a pull request: |
0800087
to
c11d654
Compare
c11d654
to
e93d1dd
Compare
Check all that apply
Type of Change
Checklist
Description of Change
Summary of Completed Tests