Repository navigation
fix: replace deprecated OTA password with encryption - #150
Conversation
ESPHome 2026.9 warns that the OTA password is redundant: the API encryption key already authenticates uploads. OTA now uses encryption (same key), the ota_password substitution is dropped everywhere, min_version is 2026.9.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@sourcery-ai review |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR updates all ESPHome configurations to use the API encryption key for encrypted OTA uploads, removes the redundant OTA password substitution from device configs, tests, secrets, and documentation, and requires ESPHome 2026.9.0 or newer. Flow diagram for the OTA configuration migrationflowchart TD
Config[Device configuration]
Version[Require ESPHome 2026.9.0+]
Encryption[Configure ota_esphome with encryption]
Remove[Remove ota_password substitution]
Upload[Dashboard or CLI encrypted OTA upload]
Config --> Version --> Encryption
Config --> Remove
Encryption --> Upload
Upload --> Device[Device accepts upload using API encryption key]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="pv_inverter/packages/init.yaml" line_range="22" />
<code_context>
name: deye-inverter
friendly_name: Deye Inverter
- min_version: "2026.8.0"
+ min_version: "2026.9.0"
name_add_mac_suffix: true
</code_context>
<issue_to_address>
**ESPHome 2026.8 rejects configuration**
When a user follows the documented minimum and runs ESPHome 2026.8, the `min_version` check rejects the configuration, so users cannot validate, build, or install it and see a version error.
Align `min_version` with the documented 2026.8 minimum, or update the documentation to require 2026.9.
Also at `devices/Waveshare-ESP32-S3-RS485-CAN/Deye-SG0xHP3.yaml:42`, `devices/Waveshare-ESP32-S3-RS485-CAN/Deye-SG0xLP1.yaml:39`, `devices/Waveshare-ESP32-S3-RS485-CAN/Deye-SG0xLP3.yaml:42`.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 1 finding to address first, and this changes the OTA trust boundary for every generated device: OTA authentication moves from a separate password to the API encryption key, and deployed devices retain that decision even if the repository change is reverted. If the key reuse or encryption configuration is unsuitable, OTA access could be broadly exposed or become unusable without a physical recovery path.
Blocking findings: pv_inverter/packages/init.yaml:22
| friendly_name: "${friendly_name}" | ||
| comment: "${device_description} by Lewa-Reka https://github.com/Lewa-Reka/esphome-deye-inverter" | ||
| min_version: "2026.8.0" | ||
| min_version: "2026.9.0" |
There was a problem hiding this comment.
🟡 Medium · ESPHome 2026.8 rejects configuration
When a user follows the documented minimum and runs ESPHome 2026.8, the min_version check rejects the configuration, so users cannot validate, build, or install it and see a version error.
Align min_version with the documented 2026.8 minimum, or update the documentation to require 2026.9.
Also at devices/Waveshare-ESP32-S3-RS485-CAN/Deye-SG0xHP3.yaml:42, devices/Waveshare-ESP32-S3-RS485-CAN/Deye-SG0xLP1.yaml:39, devices/Waveshare-ESP32-S3-RS485-CAN/Deye-SG0xLP3.yaml:42.
Prompt for AI agents
In `pv_inverter/packages/init.yaml` at line 22:
**ESPHome 2026.8 rejects configuration**
When a user follows the documented minimum and runs ESPHome 2026.8, the `min_version` check rejects the configuration, so users cannot validate, build, or install it and see a version error.
Align `min_version` with the documented 2026.8 minimum, or update the documentation to require 2026.9.
Also at `devices/Waveshare-ESP32-S3-RS485-CAN/Deye-SG0xHP3.yaml:42`, `devices/Waveshare-ESP32-S3-RS485-CAN/Deye-SG0xLP1.yaml:39`, `devices/Waveshare-ESP32-S3-RS485-CAN/Deye-SG0xLP3.yaml:42`.|
@Bonabrux thx |
ESPHome 2026.9 warns that the OTA password is redundant: the API encryption key already authenticates uploads. OTA now uses encryption (same key), the ota_password substitution is dropped everywhere, min_version is 2026.9.0.
Description
ESPHome 2026.9 flags the OTA password as redundant:
This PR follows that recommendation: OTA uploads are now authenticated and encrypted with the
existing API encryption key, so a separate OTA password is no longer needed.
Changes
pv_inverter/packages/init.yaml:ota_esphomeusesencryption:(reuses the API key)instead of
password: ${ota_password};min_versionbumped to2026.9.0devices/*/Deye-*.factory.yaml:encryption: !removeinstead ofpassword: !removedevices/*/Deye-*.yaml:ota_passwordsubstitution removed,min_version→2026.9.0pv-inverter*.yaml,tests/*.yaml,tests/secrets.yaml,docs/INSTALLATION.md:ota_password/pv_inverter_ota_passwordremovedImpact for users
ota_passwordsubstitution left in a user's config is simply unused; nothing breaks.Testing
esphome configpasses on ESPHome 2026.9.1 for all CI configs(
deye_hybrid_1p_lv,deye_hybrid_3p_lv,deye_hybrid_3p_hv); the OTA warning is goneChanges relate to
Summary by Sourcery
Migrate ESPHome OTA updates from dedicated passwords to API-key-based encryption and remove the redundant OTA password configuration.
Bug Fixes:
Enhancements:
Documentation: