Add current request context to get_url helper documentation (#638)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Franck Nijhof 2020-09-10 01:06:32 +02:00 committed by GitHub
parent d7f8340377
commit 2e1d217eed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,7 @@ The signature of the helper method:
def get_url(
hass: HomeAssistant,
*,
require_current_request: bool = False,
require_ssl: bool = False,
require_standard_port: bool = False,
allow_internal: bool = True,
@ -46,6 +47,10 @@ def get_url(
The different parameters of the method:
- `require_current_request`
Require the returned URL to match the URL the user is currently using
in their browser. If there is no current request, an error will be raised.
- `require_ssl`:
Require the returned URL to use the `https` scheme.