Fix if condition docs

This commit is contained in:
Otto Winter 2018-10-26 23:13:23 +02:00
parent 058860af11
commit ede025543e
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E

View File

@ -362,13 +362,14 @@ turns on a light for 5 seconds. Otherwise, the light is turned off immediately.
on_...:
then:
- if:
lambda: 'return id(some_sensor).state < 30;'
then:
- lambda: 'ESP_LOGD("main", "The sensor value is below 30!");
- light.turn_on: my_light
- delay: 5s
else:
- lambda: 'ESP_LOGD("main", "The sensor value is above 30!");
condition:
lambda: 'return id(some_sensor).state < 30;'
then:
- lambda: 'ESP_LOGD("main", "The sensor value is below 30!");
- light.turn_on: my_light
- delay: 5s
else:
- lambda: 'ESP_LOGD("main", "The sensor value is above 30!");
- light.turn_off: my_light