-
-
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
Create pulse-catcher.rst #4782
base: current
Are you sure you want to change the base?
Create pulse-catcher.rst #4782
Conversation
Please be gentle as this is my first PR. :) I had a case there I needed to detect an 100us incoming pulse. I couldn't find any function to solve this. After some testing and discussions on the forum and GitHub, this solution turned out to work well. I think it could be nice to add this to the cookbook section in case it will help some other in a similar situation. I have a small picture (pulses.png) to add as a "thumbnail" but I don't know where and how I should attach that.
WalkthroughA new documentation file, "Pulse Catcher", has been added to the cookbook. The document explains how to configure and use the Changes
Sequence Diagram(s)sequenceDiagram
participant Sensor as Pulse Meter
participant ActionHandler as Action Handler
participant LED as LED Module
Sensor->>ActionHandler: Detect fast pulse
ActionHandler->>LED: Turn on LED
ActionHandler->>LED: Wait 500ms delay
ActionHandler->>LED: Turn off LED
🪧 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 (4)
cookbook/pulse-catcher.rst (4)
4-7
: SEO Block & Image Reference
The SEO directive is properly defined with a description and an image reference ("pulses.png"). Please ensure that the image asset is correctly placed (or attached) according to the documentation guidelines. If necessary, add a note or link on how to manage image assets.
8-10
: Introductory Paragraph Clarity
The introductory text clearly explains the purpose of the pulse catcher. Consider rewording “shorter than the usually around 16ms loop time” to “shorter than the typical 16ms loop time” for improved clarity.
13-28
: YAML Configuration Example
The YAML configuration sample is well-structured and demonstrates how to configure thepulse_meter
sensor. A few suggestions:
- The commented-out
internal_filter
parameter is a good hint, but adding a brief explanation about when to enable it might benefit users.- The lambda filter returns an empty dictionary (
return {};
). It may be helpful to add a comment clarifying that this is used to suppress output (thus preventing log spamming) and that users can customize this behavior as needed.
29-35
: "See Also" Section & Extra Line
The "See Also" section is clearly formatted with useful references. There appears to be a stray line (line 35) with the number "35"—please remove it if it is unintentional.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
cookbook/pulse-catcher.rst
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**`: - Do not generate or add any sequence diagrams
**
: - Do not generate or add any sequence diagrams
cookbook/pulse-catcher.rst
🔇 Additional comments (2)
cookbook/pulse-catcher.rst (2)
1-2
: Title & Header Formatting Looks Good
The "Pulse Catcher" title and its underline are correctly formatted per reStructuredText standards.
11-12
: YAML Code Block Directive
The directive for the YAML code block is correctly specified. No issues here.
cookbook pulse_catcher
Wrong placed
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
To big
Link to new cookbook section "Pulse Catcher"
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/index.rst (1)
1086-1087
: New Cookbook Entry: "Pulse Catcher" AddedThe new entry for Pulse Catcher is added with the correct reference (
cookbook/pulse-catcher
) and thumbnail (pulses.png
). Please verify that the image file is present in the repository in the expected location so that it renders correctly in the documentation.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
images/pulses.png
is excluded by!**/*.png
📒 Files selected for processing (1)
components/index.rst
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**`: - Do not generate or add any sequence diagrams
**
: - Do not generate or add any sequence diagrams
components/index.rst
Please be gentle as this is my first PR. :)
Description:
I had a case there I needed to detect an 100us incoming pulse and I couldn't find any function to solve this. After some testing and discussions on the forum and GitHub, this solution turned out to work well. I think it could be nice to add this to the cookbook section in case it will help some other in a similar situation.
Related issue (if applicable): fixes
Pull request in esphome with YAML changes (if applicable):
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
/components/index.rst
when creating new documents for new components or cookbook.