Skip to content

Read runTest after it is restored, so the boot self-test can't run every boot - #22

Merged
TrevorSchirmer merged 2 commits into
betafrom
fix/boot-self-test
Nov 16, 2026
Merged

TrevorSchirmer merged 2 commits into
betafrom
fix/boot-self-test

Conversation

@Bunton33

Copy link
Copy Markdown
Contributor

Version: 26.11.11.1

What does this implement/fix?

The on_boot entry that checks runTest ran at priority 800, the same priority the runTest global restores at (HARDWARE, 800). ESPHome sorts equal priorities in registration order. When the trigger registers first, the check reads the initial value (true) and the self-test flashes after every boot. That is what happens on CAST-1 and on ROOM-1, the same core pattern.

On CAST_PRO-1 it happens to be fine today. With ESPHome 2026.11.0b3, runTest registers at #105 and the trigger at #124, so the restore runs first. The CAST PRO-1 test unit (26.11.3.3, ESPHome 2026.11.0b1) showed no flash after its 2026-11-06 reboot. That order comes from code generation, though, and any config change or ESPHome release (CI builds on dev) can flip it. Moving the check to priority 700 makes it run after the restore every time. line_in.yaml's Sendspin setup also runs at 700; the two don't depend on each other.

testScript also gets mode: restart. Without it, a second BOOT press that landed during a running test's green flash was dropped, which left runTest=true saved and caused one more flash on the next boot.

No change in behaviour is expected on units built with the current order: no flash after updating, and none on later boots.

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

Compiles on ESPHome 2026.11.0b3. Not yet run on a CAST PRO-1. Draft #21 will conflict on the version line only.

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

  • Added/updated documentation for the web page

🤖 Generated with Claude Code

The runTest check ran at on_boot priority 800, the same priority the
runTest global restores at, so registration order decided which ran
first. On ESPHome 2026.11 the restore happens to win, but CAST-1 and
ROOM-1 with the same pattern flash the LEDs on every boot. Move the check
to 700 so it always runs after the restore, and give testScript
mode: restart so a second BOOT press during the green flash can't leave
runTest saved as true.

Bump to 26.11.11.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fb1a12b2-a412-407e-94db-dc29eb6c6996
Commits

Reviewing files that changed from the base of the PR and between ec42fbb and bf9d2ce.

Files selected for processing: 1

  • Integrations/ESPHome/Core.yaml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions github-actions Bot added the bugfix Something isn't working label Nov 12, 2026
# Conflicts:
#	Integrations/ESPHome/Core.yaml
@TrevorSchirmer
TrevorSchirmer merged commit a955101 into beta Nov 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants