Add improv serial next_url (#2620)

This commit is contained in:
Jesse Hills 2023-01-25 14:37:03 +13:00 committed by GitHub
parent b7a6bc4d78
commit ba2bcccdf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 1 deletions

View File

@ -20,7 +20,26 @@ The ``improv_serial`` component requires the serial ``logger`` to be configured.
improv_serial:
No configuration variables.
Configuration variables
-----------------------
- **next_url** (*Optional*, url): A URL that can be used to forward the user to after setting credentials with improv.
Next URL
--------
Substitutions can be inserted into the URL, such as project name and version and there are some special substitutions
that can be performed by ESPHome when wrapped in double braces ``{{ }}``:
- **device_name**: This will substitute the device name including the mac address suffix.
- **ip_address**: This will substitute the IP address of the device.
- **esphome_version**: This will substitute the version of ESPHome that is running on the device.
.. code-block:: yaml
# Example next_url
improv_serial:
next_url: http://example.com/?device_name={{device_name}}&ip_address={{ip_address}}&esphome_version={{esphome_version}}
See Also
--------

View File

@ -61,6 +61,7 @@ Example configuration
# Sets up the improv via serial client for Wi-Fi provisioning
improv_serial:
next_url: https://example.com/project-template/manual?ip={{ip_address}}&name={{device_name}}&version={{esphome_version}}
Relevant Documentation