esphome
esphome copied to clipboard
Feature/add seeed grove gmxxx multichannel gas support
What does this implement/fix?
Add support for Grove Multichannel Gas Sensor V2 (https://wiki.seeedstudio.com/Grove-Multichannel-Gas-Sensor-V2). The sensors themselves do not produce measurements with units like PPM but instead just raw values read from the sensor ADC. Ideally there would be some baselining built into the sensor but I don't have any other sensors I could provide and test that baselining against. Hopefully this is something someone else can add or I can add further down the line. The raw values still provide insight into relative local changes in the different gas concentrations.
Types of changes
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Other
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#2598
Test Environment
- [ ] ESP32
- [ ] ESP32 IDF
- [x] ESP8266
- [ ] RP2040
Example entry for config.yaml:
# Example config.yaml
sensor:
- platform: grove_gas_mc_v2
no2:
name: "Nitrogen Dioxide"
ethanol:
name: "Ethanol"
carbon_monoxide:
name: "Carbon Monoxide"
tvoc:
name: "Volatile Organic Compounds"
Checklist:
- [x] The code change is tested and works locally.
- [x] Tests have been added to verify that the new code works (under
tests/folder).
If user exposed functionality or configuration variables are added/changed:
- [x] Documentation added/updated in esphome-docs.
Hey there @esphome/core, mind taking a look at this pull request as it has been labeled with an integration (sensor) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Hey there @YorkshireIoT,
Thanks for submitting this pull request! Can you add yourself as a codeowner for this integration? This way we can notify you if a bug report for this integration is reported.
In __init__.py of the integration, please add:
CODEOWNERS = ["@YorkshireIoT"]
And run script/build_codeowners.py
(message by NeedsCodeownersLabel)
Hey there @jesserockz, mind taking a look at this pull request as it has been labeled with an integration (mics_4514) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Please remove unrelated formatting changes in the test yaml file.
@jesserockz
R.e. the formatting changes in test1.yaml, these were done automatically on save within the dev container by the YAML extension and it actually stops you from reverting the changes while the extension is still enabled:
https://user-images.githubusercontent.com/55233103/221353135-76a5d21b-706c-4c01-a564-d72dbfeb63f2.mp4
I had to disable the extension to be able to save the file and commit/push the changes
lint-python failing due to unrelated error in esphome/components/esp32/__init__.py, but this is fixed in PR#4479
I had to disable the extension to be able to save the file and commit/push the changes
You can save without auto formatting with ctrl+k, s
I had to disable the extension to be able to save the file and commit/push the changes
You can save without auto formatting with
ctrl+k, s
Ah thanks, that's good to know
Hi @jesserockz, could I get a rereview of the changes you requested on this please?
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.
Hi @jesserockz,
I've tidied up the commits and rebased and resolved some merge conflicts with unrelated changes that have gone into dev since I first open this PR.
This is ready for a rereview when you have time.
Thanks 😄
Workflow run failing due to a 429 Git checkout error. If someone with the right priviledges could re-run the job when they get a chance that'd be really appreciated 😄
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.
Ping
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 54.03%. Comparing base (
4d8b5ed) to head (7eaf329). Report is 1408 commits behind head on dev.
Additional details and impacted files
@@ Coverage Diff @@
## dev #4304 +/- ##
==========================================
+ Coverage 53.70% 54.03% +0.32%
==========================================
Files 50 50
Lines 9408 9698 +290
Branches 1654 1711 +57
==========================================
+ Hits 5053 5240 +187
- Misses 4056 4127 +71
- Partials 299 331 +32
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.