esphome-docs icon indicating copy to clipboard operation
esphome-docs copied to clipboard

Improve SGP30 humidity compensation documentation

Open aveao opened this issue 1 year ago • 6 comments

Description:

SGP30 datasheet: https://sensirion.com/media/documents/984E0DD5/61644B8B/Sensirion_Gas_Sensors_Datasheet_SGP30.pdf

Justification for clarification of "absolute humidity" wording and clarification that humidity source should be a relative humidity sensor:

The datasheet makes it clear that it requires absolute humidity, which is calculated using relative humidity and temperature (celcius in the example formula):

image

The code doesn't work if it doesn't have a humidity or temperature value:

https://github.com/esphome/esphome/blob/045836c3fe4e088475c248256f7b2e537cbabe05/esphome/components/sgp30/sgp30.cpp#L165-L170

image

https://github.com/esphome/esphome/blob/045836c3fe4e088475c248256f7b2e537cbabe05/esphome/components/sgp30/sgp30.cpp#L174-L180

image

Justification for clarification of celcius requirement:

Code uses same algorithm in example and also explicitly prints the log entries in celcius:

https://github.com/esphome/esphome/blob/045836c3fe4e088475c248256f7b2e537cbabe05/esphome/components/sgp30/sgp30.cpp#L182

Related issue (if applicable): not applicable

Pull request in esphome with YAML changes (if applicable): not applicable

Checklist:

  • [ ] I am merging into next because this is new documentation that has a matching pull-request in esphome as linked above.
    or

  • [x] I am merging into current because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

  • [ ] Link added in /index.rst when creating new documents for new components or cookbook.

aveao avatar Jan 18 '24 11:01 aveao

Deploy Preview for esphome ready!

Name Link
Latest commit 1067d56305b0ed0a52f3a18d8671d61c2f24b57e
Latest deploy log https://app.netlify.com/sites/esphome/deploys/66596c701a96a20008bdddd8
Deploy Preview https://deploy-preview-3556--esphome.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jan 18 '24 11:01 netlify[bot]

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.

github-actions[bot] avatar Mar 19 '24 01:03 github-actions[bot]

I hope a message is enough to satisfy stalebot:

I generally don't find the use of stalebot tasteful, especially if it cannot handle the nuance of "I have been waiting for a review for months". Not reviewing my contribution while it is subject to a potential auto-closure makes it feel like contributions are not valued here. This goes for any repo that uses such arrangements.

edit: apparently not even a rebase and a comment will satisfy stalebot.

aveao avatar Mar 19 '24 07:03 aveao

@jesserockz @OttoWinter @nagyrobi Hi, I'm sorry for pinging you all here but the README doesn't link to anything like a development channel where I can reach people, and you three are the people that contributed most to this repo (with Otto also introducing this version of stalebot) who are also part of the esphome org.

tl;dr: Using a stalebot is really discouraging as a contributor.

With this PR I took time of my day to not only figure things out for myself, but then assemble the information and then put it into a nice shape with which it can hopefully be merged into the repo, and write a good long description to help explain all the changes, to make things better for everyone. For that I am of course not owed a timely review, but having my PR be at risk of closure because I've done my best but you haven't found time to review the PR in a timely fashion is simply insulting. The widespreadness of this type of thing makes me reconsider if I want to contribute to OSS projects at all.

Please reconsider using stalebot, especially in a config that doesn't let me bump to confirm that the PR is still valid. Or alternatively pair it with a bot to automatically assign a reviewer. Until this situation is improved, I won't be contributing to esphome (and in general, I'll avoid contributing to projects with stalebots in the future).

aveao avatar Mar 19 '24 09:03 aveao

I don't have such a sensor to confirm myseld.

nagyrobi avatar Mar 31 '24 21:03 nagyrobi

I don't have such a sensor to confirm myseld.

I tried to clarify all changes in the OP text, no physical sensor is needed, datasheet and the code makes it clear that the changes are correct.

Anyhow, I tagged you to state my concerns about the use of stalebot in PRs, not to demand a review from you or anything. Sorry if this wasn't clera.

aveao avatar Mar 31 '24 21:03 aveao

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.

github-actions[bot] avatar May 31 '24 01:05 github-actions[bot]

PR is still valid.

aveao avatar May 31 '24 06:05 aveao

Walkthrough

The recent updates to the sgp30.rst file in the components/sensor directory include detailed clarifications regarding the compensation block for generating absolute humidity. Specifically, the changes ensure that it is clear both temperature and humidity values must be provided. Additionally, the description now explicitly states the units for temperature data and specifies the type of sensor used for humidity measurements.

Changes

File Path Change Summary
components/sensor/sgp30.rst Clarified the need for both temperature and humidity values in compensation block, specified temperature data unit, and identified the type of sensor for humidity.

Sequence Diagram(s) (Beta)

No sequence diagrams are necessary for these documentation updates.


Recent review details

Configuration used: CodeRabbit UI Review profile: CHILL

Commits

Files that changed from the base of the PR and between d4ad0730db5a4e4dde09b992b78a269d34a9fd8a and 1067d56305b0ed0a52f3a18d8671d61c2f24b57e.

Files selected for processing (1)
  • components/sensor/sgp30.rst (1 hunks)
Additional comments not posted (1)
components/sensor/sgp30.rst (1)

75-80: Clarification on temperature and humidity sources is well-explained.

The addition of specifying that the temperature data must be in Celsius and the humidity source should be a relative humidity sensor is clear and aligns with the datasheet requirements. This should help users in setting up their sensors correctly.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar May 31 '24 06:05 coderabbitai[bot]