Add working example of Time since last boot.#6283
Add working example of Time since last boot.#6283n0tf0und wants to merge 1 commit intoesphome:currentfrom
Conversation
WalkthroughThis PR adds a complete working configuration example for the uptime sensor in the documentation, demonstrating time-based sensor setup with Home Assistant time entity integration. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment Tip CodeRabbit can approve the review once all CodeRabbit's comments are resolved.Enable the |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/content/docs/components/sensor/uptime.mdx (1)
29-29: Add YAML language tag to the new fenced block.Use
```yamlinstead of```for consistent syntax highlighting and docs readability.Proposed doc tweak
-``` +```yaml # Working example time: - platform: homeassistant id: esptime🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/content/docs/components/sensor/uptime.mdx` at line 29, Change the new fenced code block that contains the lines starting with "# Working example" and the "time:" list to include a YAML language tag by replacing the opening backticks (```) with "```yaml" so the block reads as a YAML fenced block for proper syntax highlighting and consistent docs readability.
🤖 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/uptime.mdx`:
- Line 29: Change the new fenced code block that contains the lines starting
with "# Working example" and the "time:" list to include a YAML language tag by
replacing the opening backticks (```) with "```yaml" so the block reads as a
YAML fenced block for proper syntax highlighting and consistent docs
readability.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 912a6bcf-6c46-457d-885c-1f4b82f4d8a5
📒 Files selected for processing (1)
src/content/docs/components/sensor/uptime.mdx
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Description
Related issue (if applicable): fixes
Pull request in esphome with YAML changes (if applicable):
Checklist
I am merging into
nextbecause this is new documentation that has a matching pull-request in esphome as linked above.or
I am merging into
currentbecause 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.mdxwhen 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:
Comment on this pull request with the following command, replacing
component_namewith your component name in lower_case format with underscores (e.g.,bme280,sht3x,dallas_temp):The ESPHome bot will respond with a downloadable ZIP file containing the SVG image.
Extract the SVG file and place it in the
/public/images/folder of this repository.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:
Note: All images used in ImgTable components must be placed in
/public/images/as the component resolves them to absolute paths.