mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 16:27:19 +00:00
add resource_template configuration resource (#11719)
This commit is contained in:
parent
182b984c81
commit
ef8938ac2a
@ -49,6 +49,14 @@ binary_sensor:
|
||||
resource: http://IP_ADDRESS/ENDPOINT
|
||||
method: POST
|
||||
```
|
||||
or a template based request:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
- platform: rest
|
||||
resource_template: {% raw %} "http://IP_ADDRESS/{{ now().strftime('%Y-%m-%d') }}" {% endraw %}
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
resource:
|
||||
@ -56,6 +64,10 @@ resource:
|
||||
required: true
|
||||
type: string
|
||||
default: string
|
||||
resource_template:
|
||||
description: The resource or endpoint that contains the value with template support.
|
||||
required: false
|
||||
type: template
|
||||
method:
|
||||
description: The method of the request.
|
||||
required: false
|
||||
|
Loading…
x
Reference in New Issue
Block a user