-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 adc/sampling_mode doc #4601
base: current
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request introduces a new optional configuration variable Changes
Suggested reviewers
Possibly related PRs
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
components/sensor/adc.rst (1)
38-38
: Consider enhancing the documentation with examples.To help users better understand when to use each sampling mode, consider adding:
- Example configurations showing different sampling modes
- Brief explanations of when each mode might be useful (e.g.,
max
for detecting peaks,min
for noise floor, etc.)Example addition:
- **sampling_mode** (*Optional*): Sampling method to use when multiple samples are taken. Can be ``avg`` (average of all samples), ``min`` (minimal value from all samples), ``max`` (maximal value from all samples). Defaults to ``avg``. + + Example of using maximum sampling mode to detect voltage peaks: + + .. code-block:: yaml + + sensor: + - platform: adc + pin: GPIO32 + name: "Peak Voltage Sensor" + samples: 10 + sampling_mode: max + update_interval: 60s
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/sensor/adc.rst
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
components/sensor/adc.rst (1)
Pattern **
: - Do not generate or add any sequence diagrams
🔇 Additional comments (1)
components/sensor/adc.rst (1)
38-38
: LGTM! The documentation for the new configuration variable is clear and well-formatted.The
sampling_mode
parameter is documented in a consistent style with other configuration variables, clearly listing all possible values and the default.
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Description:
Pull request in esphome with YAML changes (if applicable): esphome/esphome#8131
Checklist:
I am merging into
next
because this is new documentation that has a matching pull-request in esphome as linked above.or
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.