Remove blank lines

This commit is contained in:
Fabian Affolter 2017-12-03 16:12:43 +01:00
parent bbddfc14a7
commit 973cefc427
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336

View File

@ -55,11 +55,9 @@ Configuration variables:
Here's an example of `input_number` being used as a trigger in an automation.
```yaml
{% raw %}
```yaml
# Example configuration.yaml entry using 'input_number' as a trigger in an automation
# Define input_number
input_number:
bedroom_brightness:
name: Brightness
@ -67,8 +65,6 @@ input_number:
min: 0
max: 254
step: 1
# Automation.
automation:
- alias: Bedroom Light - Adjust Brightness
trigger:
@ -80,16 +76,15 @@ automation:
data_template:
entity_id: light.bedroom
brightness: '{{ trigger.to_state.state | int }}'
{% endraw %}
```
{% endraw %}
Another code example using `input_number`, this time being used in an action in an automation.
```yaml
{% raw %}
```yaml
# Example configuration.yaml entry using 'input_number' in an action in an automation
# Define 'input_select'
input_select:
scene_bedroom:
name: Scene
@ -101,8 +96,6 @@ input_select:
- Relax
- 'OFF'
initial: 'Select'
# Define input_number
input_number:
bedroom_brightness:
name: Brightness
@ -110,8 +103,6 @@ input_number:
min: 0
max: 254
step: 1
# Automation.
automation:
- alias: Bedroom Light - Custom
trigger:
@ -124,17 +115,14 @@ automation:
data_template:
entity_id: light.bedroom
brightness: '{{ states.input_number.bedroom_brightness.state | int }}'
{% endraw %}
```
{% endraw %}
Example of `input_number` being used in a bidirectional manner, both being set by and controlled by an MQTT action in an automation.
```yaml
{% raw %}
```yaml
# Example configuration.yaml entry using 'input_number' in an action in an automation
# Define input_number
input_number:
target_temp:
name: Target Heater Temperature Slider
@ -143,10 +131,9 @@ input_number:
step: 1
unit_of_measurement: step
icon: mdi:target
# Automation.
# This automation script runs when a value is received via MQTT on retained topic: setTemperature
# It sets the value slider on the GUI. This slides also had its own automation when the value is changed.
automation:
- alias: Set temp slider
trigger:
platform: mqtt
@ -156,7 +143,6 @@ input_number:
data_template:
entity_id: input_number.target_temp
value: '{{ trigger.payload}}'
# This automation script runs when the target temperature slider is moved.
# It publishes its value to the same MQTT topic it is also subscribed to.
- alias: Temp slider moved
@ -169,5 +155,5 @@ input_number:
topic: "setTemperature"
retain: true
payload: '{{ states.input_number.target_temp.state | int }}'
{% endraw %}
```
{% endraw %}