-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[json] Add a note reminding people to put json: in config to use json #5397
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
base: current
Are you sure you want to change the base?
Conversation
WalkthroughUpdated the JSON component documentation: added a root-config requirement note, expanded the Parsing JSON example with payload {"status":"play","vol":"42","mute":"0"} and a template/number extraction snippet that handles missing keys, and changed See Also links to display-name + path pairs. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate 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. Comment |
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
content/components/json.md
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
- Do not generate or add any sequence diagrams
Files:
content/components/json.md
🪛 GitHub Actions: Lint
content/components/json.md
[error] 61-61: MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"]
🔇 Additional comments (1)
content/components/json.md (1)
124-125
: apiref supports two arguments (label + path) — the two apiref lines are correct.themes/esphome-theme/layouts/shortcodes/apiref.html documents the two-argument form and many content files use that pattern.
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Description:
It wasn't obvious that one should include
json:
in the config to parse json in a lambda.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.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_NAME
with your component name in UPPER_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
images/
folder of this repository.Use the image in your component's index table entry in
/components/index.rst
.Example: For a component called "DHT22 Temperature Sensor", use: