From ef8938ac2aaf723fb9ebb3ecac0297f81963dd73 Mon Sep 17 00:00:00 2001 From: Hedgehog57 <44364616+Hedgehog57@users.noreply.github.com> Date: Wed, 24 Jun 2020 01:23:52 +0300 Subject: [PATCH] add resource_template configuration resource (#11719) --- source/_integrations/binary_sensor.rest.markdown | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/_integrations/binary_sensor.rest.markdown b/source/_integrations/binary_sensor.rest.markdown index f3a433442b4..19fa8e56b44 100644 --- a/source/_integrations/binary_sensor.rest.markdown +++ b/source/_integrations/binary_sensor.rest.markdown @@ -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