Repository navigation
Read runTest after it is restored, so the boot self-test can't run every boot - #22
Merged
Merged
Conversation
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>
|
Warning Review limit reachedYou'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. View limit details
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. |
# Conflicts: # Integrations/ESPHome/Core.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Version: 26.11.11.1
What does this implement/fix?
The
on_bootentry that checksrunTestran at priority 800, the same priority therunTestglobal 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,
runTestregisters 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.testScriptalso getsmode: restart. Without it, a second BOOT press that landed during a running test's green flash was dropped, which leftrunTest=truesaved 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
Checklist / Checklijst:
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:
🤖 Generated with Claude Code