From 654b0b888ae9e2c5baebaad3cf70b295920c4ff7 Mon Sep 17 00:00:00 2001 From: Oncleben31 Date: Sat, 6 Oct 2018 14:45:04 +0200 Subject: [PATCH] command_line sensor with new style for configuration variables (#6534) * command_line sensor with new style for configuration variables descritpion Implement the new style for configuration variables description as requested by #6385 * :pencil2: Tweak --- .../_components/sensor.command_line.markdown | 41 +++++++++++++++---- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/source/_components/sensor.command_line.markdown b/source/_components/sensor.command_line.markdown index 04f31df2ae6..9e03ee8eae0 100644 --- a/source/_components/sensor.command_line.markdown +++ b/source/_components/sensor.command_line.markdown @@ -27,15 +27,38 @@ sensor: command: SENSOR_COMMAND ``` -Configuration variables: - -- **command** (*Required*): The action to take to get the value. -- **name** (*Optional*): Name of the command sensor. -- **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any. -- **value_template** (*Optional*): Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract a value from the payload. -- **scan_interval** (*Optional*): Defines number of seconds for polling interval (defaults to 60 seconds). -- **command_timeout** (*Optional*): Defines number of seconds for command timeout (defaults to 15 seconds). -- **json_attributes** (*Optional*): Defines a list of keys to extract values from a JSON dictionary result and then set as sensor attributes. +{% configuration %} +command: + description: The action to take to get the value. + required: true + type: string +name: + description: Name of the command sensor. + required: false + type: string +unit_of_measurement: + description: Defines the unit of measurement of the sensor, if any. + required: false + type: string +value_template: + description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract a value from the payload." + required: false + type: string +scan_interval: + description: Defines number of seconds for polling interval. + required: false + type: integer + default: 60 +command_timeout: + description: Defines number of seconds for command timeout + required: false + type: integer + default: 15 +json_attributes: + description: Defines a list of keys to extract values from a JSON dictionary result and then set as sensor attributes. + required: false + type: string, list +{% endconfiguration %} ## {% linkable_title Examples %}