Skip to content

[ld2420] add missing docs and add docs for startup_delay#6427

Open
jharris4 wants to merge 1 commit intoesphome:currentfrom
jharris4:current
Open

[ld2420] add missing docs and add docs for startup_delay#6427
jharris4 wants to merge 1 commit intoesphome:currentfrom
jharris4:current

Conversation

@jharris4
Copy link
Copy Markdown

@jharris4 jharris4 commented Apr 9, 2026

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 /src/content/docs/components/index.mdx when creating new documents for new components or cookbook.

New Component Images

If you are adding a new component to ESPHome, you can automatically generate a standardized black and white component name image for the documentation.

To generate a component image:

  1. Comment on this pull request with the following command, replacing component_name with your component name in lower_case format with underscores (e.g., bme280, sht3x, dallas_temp):

    @esphomebot generate image component_name
    
  2. The ESPHome bot will respond with a downloadable ZIP file containing the SVG image.

  3. Extract the SVG file and place it in the /public/images/ folder of this repository.

  4. Use the image in your component's index table entry in /src/content/docs/components/index.mdx.

Example: For a component called "DHT22 Temperature Sensor", use:

@esphomebot generate image dht22

Note: All images used in ImgTable components must be placed in /public/images/ as the component resolves them to absolute paths.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 2026

Walkthrough

Updated the ld2420 platform configuration documentation by replacing a single required entry with three documented optional configuration parameters: uart_id, id, and startup_delay (with a default value of zero).

Changes

Cohort / File(s) Summary
Configuration Documentation
src/content/docs/components/sensor/ld2420.mdx
Updated ld2420 platform configuration documentation to document three optional fields: uart_id, id, and startup_delay, replacing previous single required entry.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

current

Suggested reviewers

  • nagyrobi
  • clydebarrow
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: adding missing documentation and documenting the startup_delay parameter for the ld2420 component.
Description check ✅ Passed The description is a documentation template that is related to the changeset, referencing the component being documented and merge guidelines, though it uses placeholder text.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/content/docs/components/sensor/ld2420.mdx (1)

118-118: Clarify startup_delay default with an explicit time unit.

startup_delay is typed as [Time], so “defaults to zero” is slightly ambiguous. Consider using Defaults to \0s`` for consistency and clarity.

✏️ Suggested wording tweak
-- **startup_delay** (*Optional*, [Time](/guides/configuration-types#time)): An optional startup delay - defaults to zero.
+- **startup_delay** (*Optional*, [Time](/guides/configuration-types#time)): Optional startup delay before initialization. Defaults to `0s`.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/components/sensor/ld2420.mdx` at line 118, The doc line for
the config field startup_delay is ambiguous because it omits a time unit; update
the description for startup_delay (in the sensor component docs) to explicitly
show the time unit, e.g., "Defaults to `0s`" or similar so it reads:
startup_delay (Optional, [Time]): An optional startup delay — defaults to 0s;
keep the [Time] type reference and formatting consistent with other Time
defaults.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/content/docs/components/sensor/ld2420.mdx`:
- Line 118: The doc line for the config field startup_delay is ambiguous because
it omits a time unit; update the description for startup_delay (in the sensor
component docs) to explicitly show the time unit, e.g., "Defaults to `0s`" or
similar so it reads: startup_delay (Optional, [Time]): An optional startup delay
— defaults to 0s; keep the [Time] type reference and formatting consistent with
other Time defaults.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1c1e8b14-05e0-4e40-9a8e-2a7d79562ba9

📥 Commits

Reviewing files that changed from the base of the PR and between 1b005da and 60397e3.

📒 Files selected for processing (1)
  • src/content/docs/components/sensor/ld2420.mdx

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 9, 2026

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 60397e3
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/69d7f123e468dc0008cfd12e
😎 Deploy Preview https://deploy-preview-6427--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 project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant