Keep Bluetooth Proxy on for legacy BLE builds - #103
Conversation
The Bluetooth Proxy switch does restore from flash, but the _OFF half of RESTORE_DEFAULT_OFF decides the boot where nothing is stored yet, which is the first boot after the switch shipped. MTR-1_BLE.yaml inherited that mode from Core, so legacy BLE devices that had always proxied came up with the proxy off after updating. Core now reads the mode from a bluetooth_proxy_restore_mode substitution defaulting to RESTORE_DEFAULT_OFF, and MTR-1_BLE.yaml overrides it to RESTORE_DEFAULT_ON, the same override pattern the file already uses for its OTA manifest URLs. The unified image is unchanged and a user's saved choice still wins on every later boot. Refs ApolloAutomation/MSR-2#92 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughBluetooth Proxy restoration is configurable through a Core.yaml substitution. The MTR-1 BLE variant sets that mode to restore the proxy on, while related boot comments and the Core version are updated. ChangesBluetooth Proxy Restoration
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Version: 26.7.29.1
What does this implement/fix?
The Bluetooth Proxy switch does restore from flash, but the
_OFFhalf ofRESTORE_DEFAULT_OFFonly decides the boot where nothing is stored yet, which isthe first boot after the switch shipped.
MTR-1_BLE.yamlinherited that mode fromCore, so a legacy BLE device that had always proxied comes up with the proxy off
after updating and stays that way until the user finds the switch. Reported in ApolloAutomation/MSR-2#92.
Core now reads the mode from a
bluetooth_proxy_restore_modesubstitutiondefaulting to
RESTORE_DEFAULT_OFF, andMTR-1_BLE.yamloverrides it toRESTORE_DEFAULT_ON, the same override pattern that file already uses for its OTAmanifest URLs. The unified image is unchanged, and a user's saved choice still wins
on every later boot.
Validated with
esphome configon 2026.7.2 acrossMTR-1.yaml,MTR-1_BLE.yamland
MTR-1_Factory.yaml. Rendered switch: standardRESTORE_DEFAULT_OFF, BLERESTORE_DEFAULT_ON.Matching PRs go to AIR-1, MSR-1 and MSR-2, which carry the identical switch and BLE variant.
Types of changes
Checklist / Checklijst:
If user-visible functionality or configuration variables are added/modified:
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes