-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Update jsn_sr04t.rst #4440
base: current
Are you sure you want to change the base?
Update jsn_sr04t.rst #4440
Conversation
Add info and exemple to use AJ-SR04M
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
WalkthroughThe pull request updates the documentation for the JSN-SR04T and AJ_SR04M ultrasonic range finders, clarifying their specifications and configuration details. It revises the measurement ranges and expands the configuration instructions for the AJ_SR04M to include five modes with detailed resistor connections. Additionally, the YAML configuration example has been modified to change the platform name, adjust parameters, and introduce new filtering options for measurement accuracy. Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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: 2
🧹 Outside diff range and nitpick comments (2)
components/sensor/jsn_sr04t.rst (2)
24-24
: Fix grammatical error in modes introductionThere's a grammatical error in the modes introduction.
-the AJ_SR04M as 5 modes : +The AJ_SR04M has 5 modes:
30-33
: Maintain consistent formatting for "Serial Port" mentionsThe term "Serial Port" is bolded in some modes but not others. Maintain consistent formatting across all mode descriptions.
-Mode 2: Automatic **Serial Port** mode - (Minimum Power Consumption 2.5mA) -Mode 3: Lower power **Serial Port** Trigger (Minimum Power Consumption 20uA) +Mode 2: Automatic Serial Port mode - (Minimum Power Consumption 2.5mA) +Mode 3: Lower power Serial Port Trigger (Minimum Power Consumption 20uA)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
components/sensor/jsn_sr04t.rst
(3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
components/sensor/jsn_sr04t.rst (1)
Pattern **
: - Do not generate or add any sequence diagrams
🔇 Additional comments (1)
components/sensor/jsn_sr04t.rst (1)
92-93
: LGTM: Clear documentation of configuration variables
The documentation for the update_interval
configuration variable is clear and properly notes its limitations for different modes.
echo_pin: ${ultrasonic_rx_pin} | ||
trigger_pin: | ||
number: ${ultrasonic_tx_pin} | ||
echo_pin: | ||
number: ${ultrasonic_rx_pin} |
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.
Remove duplicate echo_pin configuration
The echo_pin
is configured twice, which could cause confusion. Remove the first occurrence since the second one provides a more detailed configuration.
- echo_pin: ${ultrasonic_rx_pin}
trigger_pin:
number: ${ultrasonic_tx_pin}
echo_pin:
number: ${ultrasonic_rx_pin}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
echo_pin: ${ultrasonic_rx_pin} | |
trigger_pin: | |
number: ${ultrasonic_tx_pin} | |
echo_pin: | |
number: ${ultrasonic_rx_pin} | |
trigger_pin: | |
number: ${ultrasonic_tx_pin} | |
echo_pin: | |
number: ${ultrasonic_rx_pin} |
This sensor allows you to use the JSN-SR04T and AJ_SR04M Ultrasonic Range Finder **in Mode 1 and 2** | ||
with ESPHome to measure distances. |
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.
Update introduction to reflect all supported modes
The introduction mentions only modes 1 and 2, but the document later describes 5 modes (0-4) for the AJ_SR04M sensor. Consider updating the introduction to accurately reflect all supported modes.
-This sensor allows you to use the JSN-SR04T and AJ_SR04M Ultrasonic Range Finder **in Mode 1 and 2**
+This sensor allows you to use the JSN-SR04T (in Mode 1 and 2) and AJ_SR04M Ultrasonic Range Finder (in Modes 0-4)
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
This sensor allows you to use the JSN-SR04T and AJ_SR04M Ultrasonic Range Finder **in Mode 1 and 2** | |
with ESPHome to measure distances. | |
This sensor allows you to use the JSN-SR04T (in Mode 1 and 2) and AJ_SR04M Ultrasonic Range Finder (in Modes 0-4) | |
with ESPHome to measure distances. |
Add info and exemple to use AJ-SR04M
Description:
Related issue (if applicable): fixes
Pull request in esphome with YAML changes (if applicable): esphome/esphome#
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.