Skip to content

Keep Bluetooth Proxy on for legacy BLE builds - #103

Merged
bharvey88 merged 2 commits into
betafrom
fix/ble-proxy-restore-on
Aug 18, 2026
Merged

Keep Bluetooth Proxy on for legacy BLE builds#103
bharvey88 merged 2 commits into
betafrom
fix/ble-proxy-restore-on

Conversation

@bharvey88

@bharvey88 bharvey88 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Version: 26.7.29.1

What does this implement/fix?

The Bluetooth Proxy switch does restore from flash, but the _OFF half of
RESTORE_DEFAULT_OFF only 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 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_mode substitution
defaulting to RESTORE_DEFAULT_OFF, and MTR-1_BLE.yaml overrides it to
RESTORE_DEFAULT_ON, the same override pattern that 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.

Validated with esphome config on 2026.7.2 across MTR-1.yaml, MTR-1_BLE.yaml
and MTR-1_Factory.yaml. Rendered switch: standard RESTORE_DEFAULT_OFF, BLE
RESTORE_DEFAULT_ON.

Matching PRs go to AIR-1, MSR-1 and MSR-2, which carry the identical switch and BLE variant.

Types of changes

  • Bugfix (fixed change that fixes an issue)
  • New feature (thanks!)
  • Breaking change (repair/feature that breaks existing functionality)
  • Dependency Update - Does not publish
  • Other - Does not publish
  • Website of github readme file update - Does not publish
  • Github workflows - Does not publish

Checklist / Checklijst:

  • The code change has been tested and works locally
  • The code change has not yet been tested

If user-visible functionality or configuration variables are added/modified:

  • Added/updated documentation for the web page

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added configurable Bluetooth Proxy restore behavior for device variants.
    • BLE variants restore Bluetooth Proxy to an enabled state by default, while core devices default to disabled.
  • Bug Fixes

    • Improved Bluetooth Proxy and BLE scanning state restoration after updates and reboots.
    • Updated the device version to 26.8.18.1.

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)
@bharvey88 bharvey88 added the bugfix Bug fix label Jul 29, 2026
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 305c6b43-9757-43be-820a-9722149a15df

📥 Commits

Reviewing files that changed from the base of the PR and between 5242386 and 98f5e9b.

📒 Files selected for processing (1)
  • Integrations/ESPHome/Core.yaml

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


Walkthrough

Bluetooth Proxy restoration is configurable through Core.yaml. The MTR-1 BLE variant restores the proxy on by default. Core.yaml also updates the firmware version and boot commentary.

Changes

Bluetooth Proxy Restoration

Layer / File(s) Summary
Restore mode configuration
Integrations/ESPHome/Core.yaml, Integrations/ESPHome/MTR-1_BLE.yaml
Core.yaml defines the Bluetooth Proxy restore-mode substitution and updates boot-state commentary. The BLE variant sets it to RESTORE_DEFAULT_ON.
Switch restore wiring
Integrations/ESPHome/Core.yaml
The Bluetooth Proxy switch uses the configurable restore mode. The apollo-mtr-1 firmware version is updated.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 98f5e

This localized change keeps Bluetooth Proxy enabled by default for legacy BLE builds while preserving saved user choices; no actionable merge-blocking risk remains after normal checks and review.

Poem

A rabbit checks the proxy light,
BLE returns in mode just right.
Core sets the restore key,
The BLE variant wakes with glee.
A fresh version starts the flight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: preserving Bluetooth Proxy activation for legacy BLE builds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ble-proxy-restore-on

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.

Re-dated for the merge day per versioning policy.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@bharvey88
bharvey88 merged commit 897f621 into beta Aug 18, 2026
10 checks passed
@bharvey88
bharvey88 deleted the fix/ble-proxy-restore-on branch August 18, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant