Guard the session start against a missing key, reword the warning, and let the wizard use the key for OTA

This commit is contained in:
J. Nick Koston
2026-09-05 12:56:06 +02:00
parent e3e755850f
commit 1b99443a97
6 changed files with 42 additions and 15 deletions
@@ -452,7 +452,7 @@ def test_encryption_offer_codegen(
assert defines_present <= defines
assert not (defines_absent & defines)
encrypted = "USE_OTA_ENCRYPTION" in defines_present
assert ("set_noise_psk(" in main_cpp) is encrypted
assert ("esphome_esphomeotacomponent_id->set_noise_psk(" in main_cpp) is encrypted
assert ("set_auth_password(" in main_cpp) is ("USE_OTA_PASSWORD" in defines_present)
# The noise transport source compiles only when the define is set
assert FILTER_SOURCE_FILES() == ([] if encrypted else ["ota_esphome_noise.cpp"])