You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Drop the Apollo Substitution No Template Defines - #165
Corrects the Apollo PLT-1B substitution list in OPERATIONS.md, which is the finding Copilot raised against the promotion pull request.
aht_variant is documented as one of three exposed per-plant overrides and has never existed in any template, so the published contract named a knob no reader can set.
The list now names the four the template actually exposes, with the defaults it sets.
The NVS wipe requirement is scoped to the two first-boot values, since the two reboot timeouts are compile-time.
Two template comments are corrected: 0s disables the API reboot watchdog rather than keeping a sensor awake, and raising it starts a reboot cycle rather than a single reboot.
Why
Apollo hardcodes variant: AHT20 in its own package and exposes no substitution for it, so the knob cannot be set from a device config. git log -S aht_variant -- templates/ finds no commit that ever added it, and the neighboring "Keep templates minimal" note records that a sensor variant was tried on this device and made no observable difference, which is the decision this removal brings the list into line with.
Verification
Every bullet checked against templates/apollo-plt-1b.yaml and the cached upstream package: the four names, the four defaults, Apollo's own reboot_timeout: 0s, the absence of any upstream WiFi reboot timeout, and the 90 second run_duration wake window that bounds the reboot-cycle claim.
test/apollo-plt-1b.yaml validates.
No reference to aht_variant remains anywhere in the tree.
Notes
A pre-existing error two bullets away is fixed here too, on the maintainer's instruction: the "Keep templates minimal" note reported tuning tried on the PLT-1B and then named an SCD41, a sensor that board does not carry. Its air sensor is the AHT that Apollo pins to variant AHT20, and the only SCD4x in the tree is the CeilSense's. That also settles the singular verb the compound subject carried.
The removed half is unrecorded rather than disproved. The phrase was authored in the commit that added the CeilSense, so the SCD41 likely meant that board, and nothing in this repository records a CeilSense humidity observation to move it to.
aht_variant is documented as an exposed per-plant override and has never
existed in any template, so the published contract names a knob a reader
cannot set. Apollo hardcodes variant AHT20 in its own package, and no unit
in the fleet carries an AHT10.
The list now names the four substitutions the template actually exposes,
and the NVS wipe requirement is scoped to the two first-boot values it
applies to rather than to the reboot timeouts, which take effect on a
reflash.
The reboot claim held only for a unit Prevent Sleep keeps awake, since a
sleeping unit resets at the 90 second wake window before a longer timeout
elapses. Apollo also ships a factory reset button, so a USB erase is not
the only way to move a stored first-boot value. The first two bullets now
state their defaults like the other two.
The factory reset reads as a ready alternative to the USB erase, and it is
not one on the deployed sleeping unit the paragraph is about, which has no
wakeup pin. The template comment also still carried the unqualified reboot
claim the section narrowed.
Every accurate form of the factory reset aside needs preconditions this
section is not about, so the paragraph keeps the USB route it always had.
The header comment also said 0s keeps a sensor awake, which Prevent Sleep
does, where 0s only disables the API reboot watchdog.
Apollo ships a factory reset that clears preferences too, so naming the
USB erase as the only route was wrong. The instruction now gives the route
without claiming it is the sole one.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: d9411ce3-aa42-423a-98f4-0b14f2daea89
📥 Commits
Reviewing files that changed from the base of the PR and between d8f823c and d5c79c7.
📒 Files selected for processing (2)
OPERATIONS.md
templates/apollo-plt-1b.yaml
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
📝 Walkthrough
Walkthrough
The Apollo PLT-1B documentation now lists two first-boot NVS values and two compile-time reboot timeouts. Template comments describe reboot behavior when Home Assistant is unreachable. The operations guide also removes the SCD41 reference from the AHT guidance.
The substitution list replaces aht_variant with api_reboot_timeout and wifi_reboot_timeout. The documentation distinguishes NVS-wipe values from compile-time values and clarifies reboot-cycle behavior. The AHT guidance no longer names the SCD41.
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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 identifies the main change: removing the Apollo substitution that the template does not define. It is concise and related to the documented substitution-list correction.
✨ Finishing Touches🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
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.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
The updated PLT-1B substitution bullets in OPERATIONS.md include upstream-derived constants/claims (“90 second wake window”, “ESPHome’s own default”) that can drift and should be reworded to avoid hard-coding values not defined in-repo.
Get a fresh assessment by requesting another Copilot review.
This PR updates the Apollo PLT-1B operational documentation to match what templates/apollo-plt-1b.yaml actually exposes, removing a previously documented substitution that does not exist and clarifying how the remaining substitutions behave.
Changes:
Correct the documented substitution set for the Apollo PLT-1B to the four substitutions actually exposed by the template, including defaults.
Clarify which substitutions require an NVS wipe to take effect on already-deployed devices vs which are compile-time on the next flash.
Fix two template comments describing the meaning/effect of api_reboot_timeout.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
The updated api_reboot_timeout comments in templates/apollo-plt-1b.yaml still overstate reboot-cycle behavior without clearly conditioning it on the device remaining awake long enough for the timeout to elapse.
Get a fresh assessment by requesting another Copilot review.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟢 Approval recommended
Only a small documentation-clarity tweak remains (to make the run_duration comparison unambiguous), and the changes are otherwise consistent and low risk.
Clarify api_reboot_timeout comparison to run_duration
OPERATIONS.md:220
The last sentence of the api_reboot_timeout bullet is ambiguous about what must be "below" run_duration. As written, "A sleeping unit loops only below Apollo's own run_duration" can read like the unit itself is below a duration. Clarify that the comparison is between api_reboot_timeout and Apollo's run_duration so the condition is unambiguous.
Answering the "Previously missed" finding from the round on 04b97bf, which opened no thread to reply in.
Clarify api_reboot_timeout comparison to run_duration is fixed in 249de86. The sentence now reads "A sleeping unit loops only when the timeout is below Apollo's own run_duration, 90 seconds in the cached package", so both compared quantities are named and "the timeout" has one referent in that bullet.
The direction is verified rather than assumed: two timers race on a sleeping unit with Home Assistant unreachable, the API reboot at the configured value and deep sleep at Apollo's 90 second run_duration (Battery.yaml plus the boot-priority-999 set_run_duration(90 * 1000) in PLT-1B.yaml). A value below 90 seconds reboots first into a still-unreachable boot, so it loops. A value above it lets deep sleep win.
The bullet reports tuning tried on the Apollo PLT-1B and then names an
SCD41, which that board does not carry. Its air sensor is the AHT that
Apollo pins to variant AHT20, and the only SCD4x in the tree is the
CeilSense's. The sentence now names the one sensor the claim was observed
on, which also settles the singular verb the compound subject carried.
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
commentsPermits the comment lines the pull request adds or edits, which the prose gate otherwise refuses
2 participants
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.
What
Corrects the Apollo PLT-1B substitution list in
OPERATIONS.md, which is the finding Copilot raised against the promotion pull request.aht_variantis documented as one of three exposed per-plant overrides and has never existed in any template, so the published contract named a knob no reader can set.0sdisables the API reboot watchdog rather than keeping a sensor awake, and raising it starts a reboot cycle rather than a single reboot.Why
Apollo hardcodes
variant: AHT20in its own package and exposes no substitution for it, so the knob cannot be set from a device config.git log -S aht_variant -- templates/finds no commit that ever added it, and the neighboring "Keep templates minimal" note records that a sensorvariantwas tried on this device and made no observable difference, which is the decision this removal brings the list into line with.Verification
templates/apollo-plt-1b.yamland the cached upstream package: the four names, the four defaults, Apollo's ownreboot_timeout: 0s, the absence of any upstream WiFi reboot timeout, and the 90 secondrun_durationwake window that bounds the reboot-cycle claim.test/apollo-plt-1b.yamlvalidates.aht_variantremains anywhere in the tree.Notes
A pre-existing error two bullets away is fixed here too, on the maintainer's instruction: the "Keep templates minimal" note reported tuning tried on the PLT-1B and then named an SCD41, a sensor that board does not carry. Its air sensor is the AHT that Apollo pins to variant AHT20, and the only SCD4x in the tree is the CeilSense's. That also settles the singular verb the compound subject carried.
The removed half is unrecorded rather than disproved. The phrase was authored in the commit that added the CeilSense, so the SCD41 likely meant that board, and nothing in this repository records a CeilSense humidity observation to move it to.
🤖 Generated with Claude Code
Summary by CodeRabbit