mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
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 * ✏️ Tweak
This commit is contained in:
parent
0378f2ddce
commit
654b0b888a
@ -27,15 +27,38 @@ sensor:
|
|||||||
command: SENSOR_COMMAND
|
command: SENSOR_COMMAND
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
{% configuration %}
|
||||||
|
command:
|
||||||
- **command** (*Required*): The action to take to get the value.
|
description: The action to take to get the value.
|
||||||
- **name** (*Optional*): Name of the command sensor.
|
required: true
|
||||||
- **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any.
|
type: string
|
||||||
- **value_template** (*Optional*): Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract a value from the payload.
|
name:
|
||||||
- **scan_interval** (*Optional*): Defines number of seconds for polling interval (defaults to 60 seconds).
|
description: Name of the command sensor.
|
||||||
- **command_timeout** (*Optional*): Defines number of seconds for command timeout (defaults to 15 seconds).
|
required: false
|
||||||
- **json_attributes** (*Optional*): Defines a list of keys to extract values from a JSON dictionary result and then set as sensor attributes.
|
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 %}
|
## {% linkable_title Examples %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user