Skip to content

Add boot status LED feature and firmware version sensors#57

Open
bharvey88 wants to merge 1 commit intobetafrom
feature/boot-status-led
Open

Add boot status LED feature and firmware version sensors#57
bharvey88 wants to merge 1 commit intobetafrom
feature/boot-status-led

Conversation

@bharvey88
Copy link
Contributor

@bharvey88 bharvey88 commented Feb 5, 2026

Summary

  • Add boot status LED that shows connection status on boot (blue=HA, green=WiFi, yellow=not connected)
  • Add "Boot Status LED" toggle switch to enable/disable the feature
  • Add "ESPHome Version" and "Apollo Firmware Version" text sensors
  • Update button timing: 2-8s hold runs both statusCheck and testScript

New Features

  • Boot Status LED: Shows connection status for 5 seconds after boot
    • 🔵 Blue = Connected to Home Assistant
    • 🟢 Green = WiFi only
    • 🟡 Yellow = Not connected
  • Toggle Switch: "Boot Status LED" in Config to enable/disable (on by default)
  • Manual Diagnostic: Hold reset button 2-8 seconds to run connection check + hardware test
  • Firmware Version Sensors: ESPHome and Apollo versions now visible in HA

Button Timing

Duration Action
< 2s Nothing
2-8s statusCheck → 3s wait → testScript
8s+ WiFi reset

Testing

Same as MTR-1 testing guide - see MTR-1 PR #75 for details.

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features
    • Added controllable boot diagnostics toggle switch for managing startup status reporting.
    • Diagnostic information now displays firmware and ESPHome versions in the UI.
    • Boot status checks trigger on first device connection with visual LED indicators.
    • Enhanced button long-press diagnostics with comprehensive multi-condition evaluation.

- Add statusCheck script: blue=HA, green=WiFi, yellow=not connected
- Add diagnosticCheck script: runs statusCheck then testScript
- Add "Boot Status LED" toggle switch (on by default, persists)
- Add "ESPHome Version" and "Apollo Firmware Version" text sensors
- Update button timing: 2-8s hold runs diagnosticCheck
- Add wifi.on_connect trigger with 10s delay for status check
- Add api.on_client_connected trigger with 1s delay

Matches MTR-1 boot status LED implementation for consistency.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

Walkthrough

These ESPHome configuration files introduce a boot initialization state tracking system that monitors first-boot status across device startup and client connection events. The changes add global state variables, conditional API hooks for delayed status checks, new UI controls for boot status monitoring, expanded diagnostic telemetry (ESPHome and firmware versions), and reorganized scripts that sequence status checks and device testing. Similar patterns are applied across multiple configuration variants for WiFi connection handling.

Changes

Cohort / File(s) Summary
Core Configuration Enhancement
Integrations/ESPHome/Core.yaml
Added first_boot_done and boot_status_enabled global booleans to track initialization state. Added on_client_connected API hook with delayed statusCheck execution gated by boot flags. Reworked button long-press to trigger diagnosticCheck (which chains statusCheck and testScript) instead of direct testScript. Introduced Boot Status LED template switch for UI control of boot reporting. Added ESPHome Version and Apollo Firmware Version sensors for diagnostics. Expanded scripting with new statusCheck and diagnosticCheck scripts orchestrating multi-phase boot and test sequences.
WiFi Connection Boot Handlers
Integrations/ESPHome/MSR-2.yaml, Integrations/ESPHome/MSR-2_BLE.yaml, Integrations/ESPHome/MSR-2_Factory.yaml
Added on_connect automation with 10-second delay that conditionally sets first_boot_done and executes statusCheck when first boot is not done and boot status is enabled. MSR-2.yaml removes power_save_mode configuration. MSR-2_BLE.yaml adds ota_esphome identifier to OTA platform.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Poem

🐰 First boot tracked through globals so neat,
When clients connect, boot status is sweet,
Diagnostics sequence with script-choreographed grace,
Apollo awakens, joining network's embrace,
LED wisdom guides from the very first place! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: addition of a Boot Status LED feature and firmware version sensors, which are the primary new public entities and UI elements introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/boot-status-led

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 and usage tips.

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