Move templates to new topics section

This commit is contained in:
Paulus Schoutsen 2016-03-12 16:03:57 -08:00
parent cead30cb23
commit 6dc004875c
29 changed files with 56 additions and 33 deletions

View file

@ -80,7 +80,7 @@ Out of the box, the component will do nothing. You have to teach it about all in
You can use [templates] for the values of `speech/text`, `card/title` and `card/content`.
[templates]: /getting-started/templating/
[templates]: /topics/templating/
Configuring the Alexa component for the above intents would look like this:

View file

@ -363,4 +363,4 @@ The Logbook component will show a line entry when an automation is triggered. Y
![Logbook example](/images/components/automation/logbook.png)
[template]: /getting-started/templating/
[template]: /topics/templating/

View file

@ -33,7 +33,7 @@ Configuration variables:
- **name** (*Optional*): Let you overwrite the the name of the device. By default *name* from the device is used.
- **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON".
- **payload_off** (*Optional*): The payload that represents disabled state. Default is "OFF".
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
## {% linkable_title Examples %}

View file

@ -35,7 +35,7 @@ Configuration variables:
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0.
- **payload_on** (*Optional*): The payload that represents on state. Default is "ON".
- **payload_off** (*Optional*): The payload that represents state. Default is "OFF".
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
For a quick check you can use the commandline tools shipped with `mosquitto` to send MQTT messages. Set the state of your sensor manually:

View file

@ -42,7 +42,7 @@ Configuration variables:
- **resource** (*Required*): The resource or endpoint that contains the value.
- **method** (*Optional*): The method of the request. Default is GET.
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the value.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the value.
- **payload** (*Optional*): The payload to send with a POST request. Usualy formed as a dictionary.
- **name** (*Optional*): Name of the REST binary sensor.

View file

@ -37,7 +37,7 @@ Configuration options for the a TCP Sensor:
- **payload** (*Required*): What to send to the host in order to get the response we're interested in.
- **value_on** (*Required*): The value returned when the device is "on".
- **timeout** (*Optional*): How long in seconds to wait for a response from the service before giving up and disconnecting. Defaults to 10.
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the value. By default it's assumed that the entire response is the value.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the value. By default it's assumed that the entire response is the value.
- **unit** (*Optional*): The unit of measurement to use for the value.
- **buffer_size** (*Optional*): The size of the receive buffer in bytes. Set this to a larger value if you expect to receive a response larger than the default. Defaults to 1024.

View file

@ -29,7 +29,7 @@ Configuration variables:
- **sensors** array (*Required*): List of your sensors.
- **friendly_name** (*Optional*): Name to use in the Frontend.
- **sensor_class** (*Optional*): Defines the class of the sensor (motion, heat, moisture, etc)
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
## {% linkable_title Examples %}

View file

@ -66,9 +66,9 @@ Configuration variables:
- **brightness_command_topic** (*Optional*): The MQTT topic to publish commands to change the light's brightness.
- **rgb_state_topic** (*Optional*): The MQTT topic subscribed to receive RGB state updates.
- **rgb_command_topic** (*Optional*): The MQTT topic to publish commands to change the light's RGB state.
- **state_value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the state value.
- **brightness_value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the brightness value.
- **rgb_value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the RGB value.
- **state_value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the state value.
- **brightness_value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the brightness value.
- **rgb_value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the RGB value.
- **brightness_scale** (*Optional*): Defines the maximum brightness value (i.e. 100%) of the MQTT device (defaults to 255).
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.
- **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON".

View file

@ -46,7 +46,7 @@ Configuration variables:
- **optimistic** (*Optional*): Flag that defines if lock works in optimistic mode. Default is true if no state topic defined, else false.
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.
- **retain** (*Optional*): If the published message should have the retain flag on or not.
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
<p class='note warning'>
Make sure that your topic match exact. `some-topic/` and `some-topic` are different topics.

View file

@ -122,7 +122,7 @@ Home Assistant will automatically load the correct certificate if you connect to
### {% linkable_title Publish service %}
The MQTT component will register the service `publish` which allows publishing messages to MQTT topics. There are two ways of specifiying your payload. You can either use `payload` to hard-code a payload or use `payload_template` to specify a [template](/getting-started/templating/) that will be rendered to generate the payload.
The MQTT component will register the service `publish` which allows publishing messages to MQTT topics. There are two ways of specifiying your payload. You can either use `payload` to hard-code a payload or use `payload_template` to specify a [template](/topics/templating/) that will be rendered to generate the payload.
```json
{

View file

@ -37,7 +37,7 @@ Once loaded, the `notify` platform will expose a service that can be called to s
The notification component supports specifying [templates] for both the `message` and the `title`. This will allow you to use the current state of Home Assistant in your notifications.
[templates]: /getting-started/templating/
[templates]: /topics/templating/
### {% linkable_title Test if it works %}

View file

@ -42,4 +42,4 @@ Configuration variables:
- **payload_up** (*Optional*): The payload to open the rollershutter. Default is "OPEN".
- **payload_down** (*Optional*): The payload to close the rollershutter. Default is "CLOSE".
- **payload_stop** (*Optional*): The payload to stop the rollershutter. Default is "STOP".
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.

View file

@ -45,11 +45,11 @@ Configuration variables:
- **monitored_variables** array (*Optional*): List of exposed variables.
- **name** (*Required*): The name of the variable you wish to monitor.
- **unit** (*Optional*): Defines the units of measurement of the sensor, if any.
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
- **pins** array (*Optional*): List of pins to monitor. Analog pins need a leading **A** for the pin number.
- **name** (*Optional*): The name of the variable you wish to monitor.
- **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any.
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
The variables in the `monitored_variables` array must be available in the response of the device. As a starting point you could use the one of the example sketches (eg. [Ethernet](https://raw.githubusercontent.com/marcoschwartz/aREST/master/examples/Ethernet/Ethernet.ino) for an Arduino with Ethernet shield). In those sketches are two variables (`temperature` and `humidity`) available which will act as endpoints.

View file

@ -31,7 +31,7 @@ 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](/getting-started/templating/) to extract a value from the payload.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
## {% linkable_title Examples %}

View file

@ -33,7 +33,7 @@ Configuration variables:
- **name** (*Optional*): The name of the sensor. Default is 'MQTT Sensor'.
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0.
- **unit_of_measurement** (*Optional*): Defines the units of measurement of the sensor, if any.
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
## {% linkable_title Examples %}

View file

@ -44,7 +44,7 @@ Configuration variables:
- **resource** (*Required*): The resource or endpoint that contains the value.
- **method** (*Optional*): The method of the request. Default is GET.
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the value.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the value.
- **payload** (*Optional*): The payload to send with a POST request. Usualy formed as a dictionary.
- **name** (*Optional*): Name of the REST sensor.
- **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any.

View file

@ -34,7 +34,7 @@ Configuration options for the a TCP Sensor:
- **port** (*Required*): The port to connect to the host on.
- **payload** (*Required*): What to send to the host in order to get the response we're interested in.
- **timeout** (*Optional*): How long in seconds to wait for a response from the service before giving up and disconnecting. Defaults to `10`
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the value. By default it's assumed that the entire response is the value.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the value. By default it's assumed that the entire response is the value.
- **unit** (*Optional*): The unit of measurement to use for the value.
- **buffer_size** (*Optional*): The size of the receive buffer in bytes. Set this to a larger value if you expect to receive a response larger than the default. Defaults to `1024`.

View file

@ -32,7 +32,7 @@ Configuration variables:
- **sensors** array (*Required*): List of your sensors.
- **friendly_name** (*Optional*): Name to use in the Frontend.
- **unit_of_measurement** (*Optional*): Defines the units of measurement of the sensor, if any.
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
## {% linkable_title Examples %}

View file

@ -46,7 +46,7 @@ Configuration variables:
- **optimistic** (*Optional*): Flag that defines if switch works in optimistic mode. Default is true if no state topic defined, else false.
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.
- **retain** (*Optional*): If the published message should have the retain flag on or not.
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
<p class='note warning'>
Make sure that your topic match exact. `some-topic/` and `some-topic` are different topics.

View file

@ -38,7 +38,7 @@ Configuration variables:
- **switches** array (*Required*): List of your switches.
- **friendly_name** (*Optional*): Name to use in the Frontend.
- **value_template** (*Required*): Defines a [template](/getting-started/templating/) to set the state of the switch.
- **value_template** (*Required*): Defines a [template](/topics/templating/) to set the state of the switch.
- **turn_on** (*Required*): Defines an [action](/getting-started/automation/) to run when the switch is turned on.
- **turn_off** (*Required*): Defines an [action](/getting-started/automation/) to run when the switch is turned off.