From 4237b1dd315db7984c92cb84120b39e2d54410ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Thu, 13 Oct 2022 21:58:46 +0200 Subject: [PATCH] Add docs for keep_user_credentials (#2301) --- components/captive_portal.rst | 11 +++++++++-- guides/creators.rst | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/components/captive_portal.rst b/components/captive_portal.rst index e9c4a741e..dfc6d5974 100644 --- a/components/captive_portal.rst +++ b/components/captive_portal.rst @@ -16,7 +16,7 @@ After 1 minute of unsuccessful WiFi connection attempts, the ESP will start a Wi :width: 70.0% In this web interface, you can manually override the WiFi settings of the device (please note -this will be overwritten by any subsequent upload, so make sure to also update your YAML configuration). +this will be overwritten by any subsequent upload (unless ``keep_user_credentials`` is enabled) so make sure to also update your YAML configuration). Additionally, you can upload a new firmware file. @@ -34,9 +34,16 @@ manually in your browser. password: !secret wifi_ap_password captive_portal: + # Set to true to preserve captive_portal credentials over OTA updates + # Note that you can't set STA credentials in YAML if you're using this + keep_user_credentials: false -No configuration variables. +Configuration variables: +------------------------ + +- **keep_user_credentials** (*Optional*, boolean): Do not erase WiFi credentials entered using :doc:`captive_portal` over subsequent OTA updates. + Note: WiFi STA credentials cannot be set in YAML when using this. See Also -------- diff --git a/guides/creators.rst b/guides/creators.rst index c5be31e35..e41e9ac2b 100644 --- a/guides/creators.rst +++ b/guides/creators.rst @@ -49,6 +49,9 @@ Example configuration # In combination with the `ap` this allows the user # to provision wifi credentials to the device. captive_portal: + # Optionally, preserve provisioned credentials + # over subsequent OTA updates. + keep_user_credentials: true # Sets up Bluetooth LE (Only on ESP32) to allow the user # to provision wifi credentials to the device.