Add conditional to Single Core Fix sample code#6650
Conversation
Do not stop BLE scanning on disconnect if there are still active API connections, only stop when all connections are lost
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughThe docs example for single-core ESP32 now stops BLE scanning on ChangesSingle-core chip example correction
🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/content/docs/components/esp32_ble_tracker.mdx`:
- Around line 289-294: Add a leading dash before the if action so it matches the
action list syntax used elsewhere; specifically, change the action entry that
currently starts with "if:" (the block that tests "not: api.connected" and then
runs "esp32_ble_tracker.stop_scan") to be prefixed with "- if:" so the
conditional is treated as an item in the trigger's action list.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d4349431-4d2e-4914-af7f-2a86910ed042
📒 Files selected for processing (1)
src/content/docs/components/esp32_ble_tracker.mdx
Do not stop BLE scanning on disconnect if there are still active API connections, only stop when all connections are lost
Description
Current Example code stops scanning on any API disconnect. If both HA and a logging client connect and the logger disconnects, the scanning stops, even tho HA is still connected.
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.