Add web_server component's ota parameter (#1598)

This commit is contained in:
Laszlo Gazdag 2021-11-10 20:31:27 +01:00 committed by GitHub
parent 801e5faaf7
commit 59aeee460e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,6 +50,7 @@ Configuration variables:
- **username** (**Required**, string): The username to use for authentication. - **username** (**Required**, string): The username to use for authentication.
- **password** (**Required**, string): The password to check for authentication. - **password** (**Required**, string): The password to check for authentication.
- **ota** (*Optional*, boolean): Turn on or off the OTA feature inside webserver. Strongly not suggested without enabled authentication settings. Default: `true`
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. - **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
.. note:: .. note::
@ -67,12 +68,14 @@ Configuration variables:
Example web_server configuration with CSS and JS included from esphome-docs. Example web_server configuration with CSS and JS included from esphome-docs.
CSS and JS URL's are set to empty value, so no internet access is needed for this device to show it's web interface. CSS and JS URL's are set to empty value, so no internet access is needed for this device to show it's web interface.
Force to turn off OTA function because the missing authentication.
.. code-block:: yaml .. code-block:: yaml
# Example configuration entry # Example configuration entry
web_server: web_server:
port: 80 port: 80
ota: false
css_include: "../../../esphome-docs/_static/webserver-v1.min.css" css_include: "../../../esphome-docs/_static/webserver-v1.min.css"
css_url: "" css_url: ""
js_include: "../../../esphome-docs/_static/webserver-v1.min.js" js_include: "../../../esphome-docs/_static/webserver-v1.min.js"