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 support for SGP41 #3382
Add support for SGP41 #3382
Conversation
add support for SPG41 and SPG40 replaces the sgp40 component. Marked it as deprecated. Because spg41 adds NOx the new component is a multi-sensor component therefore a new configuration schema is required. The sensor type is autodetected. Algorithm tuning option added.
Hey there @SenexCrenshaw, mind taking a look at this pull request as it has been labeled with an integration ( |
Hey there @martgras, CODEOWNERS = ["@martgras"] And run (message by NeedsCodeownersLabel) |
They will need to make another release on platformio for this to work. But for now you could point |
This reverts commit 55c3d07.
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.
Minor changes, otherwise looks fine.
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
What does this implement/fix?
add support for SPG41 and SPG40. SGP41 supports all features of SGP40 but measures NOx as well.
The sensor type is autodetected.
Algorithm tuning option added.
Because spg41 adds NOx the new component is a multi-sensor component therefore a new configuration schema is required.
Therefore I decided to create a new component SPG4x supporting both sensors and mark the existing SPG40 component deprecated. Just changing the SGP40 component would break existing setups
Instead of copying the sensirion gas library code I'm now adding it as library. (https://github.com/Sensirion/arduino-gas-index-algorithm)
The only "problem" is esp-idf support. Because sensirion doesn't supply library.json the lib is considered arduino only. But actually it is framework agnostic. I submitted Sensirion/arduino-gas-index-algorithm#1 but in the meantime use my own fork at https://github.com/martgras/arduino-gas-index-algorithm .Works like a charm with esp-idf
All other code is using the codebase from SGP40 by @SenexCrenshaw
Types of changes
Related issue or feature (if applicable): fixes
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#2016
Test Environment
Example entry for
config.yaml
:Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: