Skip to content

Add Bluetooth Proxy firmware switching from HA#90

Merged
TrevorSchirmer merged 1 commit into
betafrom
ble-proxy-select
Jul 8, 2026
Merged

Add Bluetooth Proxy firmware switching from HA#90
TrevorSchirmer merged 1 commit into
betafrom
ble-proxy-select

Conversation

@bharvey88

@bharvey88 bharvey88 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Version: 26.7.8.5

What does this implement/fix?

The second half of the ApolloAutomation/AIR-1#107 split: Bluetooth Proxy switching from HA. Users can turn an MSR-1 into a Bluetooth proxy (and back) with a dropdown instead of a USB reflash or YAML editing.

  • Bluetooth Proxy select (Disabled/Enabled) joins the Firmware Channel select in composing the OTA manifest URL via apply_ota_source (one-line change: the variant now comes from the select instead of the build-time substitution).
  • Boot truth-sync: on boot each image publishes what it actually is into the select (ble_firmware substitution), so a failed or abandoned switch snaps back to reality on reboot.
  • Same-version variant switches install via the existing Firmware Update force button (merged in Add Firmware Channel switching from HA #89), which already disables BLE during the download to free heap for TLS.

No workflow changes - beta and Pages already publish both variants and their manifests, so this is one file, Core.yaml only.

To test on hardware: flash the standard image from the rolling beta release, flip Bluetooth Proxy to Enabled, press Firmware Update - the device should reinstall as the BLE image and the select should still read Enabled after reboot. Flip back to test the reverse path. Abandon a switch (toggle without pressing the button, then reboot) to see the truth-sync snap the select back.

Both selects config-validated on all three variants (ESPHome 2026.6.4). Not yet tested on hardware.

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 a new Bluetooth Proxy toggle in the device interface, allowing Bluetooth proxy mode to be switched on or off.
    • Devices now apply the selected OTA source automatically at startup.
  • Bug Fixes

    • Improved consistency so the Bluetooth proxy setting is correctly restored and applied after reboot.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding Home Assistant-controlled Bluetooth Proxy firmware switching.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ble-proxy-select

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.

Second half of the AIR-1 #107 split: lets users swap between the
standard and Bluetooth-proxy images from HA instead of reflashing over
USB or editing YAML.

- Bluetooth Proxy select (Disabled/Enabled) joins Firmware Channel in
  composing the OTA manifest URL via apply_ota_source.
- On boot each image publishes its real identity into the select
  (ble_firmware substitution), so a failed or abandoned switch snaps
  back to the truth.
- Same-version variant switches install via the existing Firmware
  Update force button (merged in #89), which already frees heap by
  disabling BLE during the download.

No workflow changes: build-beta.yml and Pages already publish both
variants and their manifests.

Version: 26.7.8.5

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@TrevorSchirmer
TrevorSchirmer merged commit ddec791 into beta Jul 8, 2026
10 checks passed
@TrevorSchirmer
TrevorSchirmer deleted the ble-proxy-select branch July 8, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants