chore(esphome): parameterize OTA password (preserve current default)#81
chore(esphome): parameterize OTA password (preserve current default)#81Tycorc wants to merge 1 commit into
Conversation
Promote the hardcoded `password: "apolloautomation"` literal in
`MSR-1.yaml` and `MSR-1_BLE.yaml` to a `${ota_password}` substitution
defined in `Core.yaml`, defaulting to the same value. Existing consumers
see no behavior change. Consumers who include this file via `packages:`
can override per-device via their own `substitutions:` block.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis pull request externalizes the OTA authentication password from hardcoded literals into a configurable variable. Core.yaml now defines a shared default ChangesOTA Password Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Version: 26.3.2.1
What does this implement/fix?
Promotes the hardcoded
password: "apolloautomation"literal inMSR-1.yamlandMSR-1_BLE.yamlto a${ota_password}substitution defined inCore.yaml, with the existing literal kept as the default. No behavior change for anyone who doesn't override.Why
Every Apollo MSR-1 currently boots with the same fleet-wide OTA password. Consumers who include this YAML via ESPHome
packages:cannot override the password from their device file because:ota: - platform: esphomeblock in the consumer file produces a duplicate-platform validation error.ota: !removeremoves the package's contribution, but YAML disallows two top-levelota:keys, so the consumer can't redeclare in the same document.The only existing workaround is to fork or vendor a local copy of this file — neither of which keeps the upstream
package_import_urlflow working.The newer Apollo product configs (MSR-2, MTR-1, PWR-1, TEMP-1, PLT-1, BTN-1, RLY-1, H-1, H-2, PUMP-1) all have
ota:blocks but no hardcoded password literal — only MSR-1 and AIR-1 still ship with one. A sibling PR has been opened against AIR-1 with the same change.What changes
Override pattern (consumer device YAML)
Backwards compat
100% — devices that don't set
ota_passwordget the same"apolloautomation"literal as before. Existing consumers, CI builds, and OTA flow unchanged.Types of changes
Checklist / Checklijst:
If user-visible functionality or configuration variables are added/modified:
Summary by CodeRabbit