Skip to content

Commit e4246aa

Browse files
authored
Fix indentation and remove use_trigger_values (fixes home-assistant#2306) (home-assistant#2313)
1 parent 48084ee commit e4246aa

File tree

3 files changed

+100
-110
lines changed

3 files changed

+100
-110
lines changed

source/_components/ifttt.manything.markdown

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -20,46 +20,42 @@ After setting up IFTTT, Maker Channel and ManyThing Channel, you can use the fol
2020
```yaml
2121
# Example configuration.yaml entry
2222
automation:
23-
- alias: 'ManyThing Recording ON'
24-
# This calls an IFTTT recipe to turn on recording of the ManyThing Camera
25-
# if we leave the house during the day.
26-
trigger:
27-
- platform: state
28-
entity_id: group.all_devices
29-
state: 'not_home'
30-
31-
condition:
32-
- platform: state
33-
entity_id: sun.sun
34-
state: 'above_horizon'
35-
36-
action:
37-
service: ifttt.trigger
38-
data: {"event":"manything_on"}
39-
40-
- alias: 'ManyThing Recording OFF'
41-
# This calls an IFTTT recipe to turn off recording of the ManyThing Camera
42-
# when we are home unless it's nighttime.
43-
trigger:
44-
- platform: state
45-
entity_id: group.all_devices
46-
state: 'home'
47-
- platform: state
48-
entity_id: sun.sun
49-
state: 'above_horizon'
50-
51-
condition: use_trigger_values
52-
53-
action:
54-
service: ifttt.trigger
55-
data: {"event":"manything_off"}
23+
- alias: 'ManyThing Recording ON'
24+
# This calls an IFTTT recipe to turn on recording of the ManyThing Camera
25+
# if we leave the house during the day.
26+
trigger:
27+
- platform: state
28+
entity_id: group.all_devices
29+
state: 'not_home'
30+
condition:
31+
- platform: state
32+
entity_id: sun.sun
33+
state: 'above_horizon'
34+
action:
35+
service: ifttt.trigger
36+
data: {"event":"manything_on"}
37+
38+
- alias: 'ManyThing Recording OFF'
39+
# This calls an IFTTT recipe to turn off recording of the ManyThing Camera
40+
# when we are home unless it's nighttime.
41+
trigger:
42+
- platform: state
43+
entity_id: group.all_devices
44+
state: 'home'
45+
condition:
46+
- condition: state
47+
entity_id: sun.sun
48+
state: 'above_horizon'
49+
action:
50+
service: ifttt.trigger
51+
data: {"event":"manything_off"}
5652
```
5753
5854
### {% linkable_title Setting up a recipe %}
5955
6056
<p class='img'>
6157
<img src='/images/components/ifttt/IFTTT_manything_trigger.png' />
62-
You need to setup a unique trigger for each event you sent to IFTTT.
58+
You need to setup a unique trigger for each event you sent to IFTTT.
6359
For ManyThing support, you need to set up an `on` and `off` event.
6460
</p>
6561

@@ -73,4 +69,3 @@ domain | `ifttt`
7369
service | `trigger`
7470
Service Data | `{"event": "manything_on"}`
7571

76-

source/_cookbook/automation_for_rainy_days.markdown

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,42 +16,37 @@ Turn on a light in the living room when it starts raining, someone is home, and
1616

1717
```yaml
1818
automation:
19-
alias: 'Rainy Day'
20-
21-
trigger:
22-
- platform: state
23-
entity_id: sensor.precip_intensity
24-
state: 'rain'
25-
- platform: state
26-
entity_id: group.all_devices
27-
state: 'home'
28-
- platform: time
29-
after: '14:00'
30-
before: '23:00'
31-
32-
condition: use_trigger_values
33-
34-
action:
35-
service: light.turn_on
36-
entity_id: light.couch_lamp
19+
- alias: 'Rainy Day'
20+
trigger:
21+
- platform: state
22+
entity_id: sensor.precip_intensity
23+
state: 'rain'
24+
condition:
25+
- platform: state
26+
entity_id: group.all_devices
27+
state: 'home'
28+
- platform: time
29+
after: '14:00'
30+
before: '23:00'
31+
action:
32+
service: light.turn_on
33+
entity_id: light.couch_lamp
3734
```
3835
3936
And then of course turn off the lamp when it stops raining but only if it's within an hour before sunset.
4037
4138
```yaml
42-
automation 2:
43-
alias: 'Rain is over'
44-
trigger:
45-
- platform: state
46-
entity_id: sensor.precip_intensity
47-
state: 'None'
48-
- platform: sun
49-
event: 'sunset'
50-
offset: '-01:00:00'
51-
52-
condition: use_trigger_values
53-
action:
54-
service: light.turn_off
55-
entity_id: light.couch_lamp
39+
- alias: 'Rain is over'
40+
trigger:
41+
- platform: state
42+
entity_id: sensor.precip_intensity
43+
state: 'None'
44+
condition:
45+
- condition: sun
46+
after: 'sunset'
47+
offset: '-01:00:00'
48+
action:
49+
service: light.turn_off
50+
entity_id: light.couch_lamp
5651
```
5752

source/_docs/automation/examples.markdown

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -17,51 +17,51 @@ Just some sample automation rules to get you started.
1717
automation:
1818
# Turns on lights 1 hour before sunset if people are home
1919
# and if people get home between 16:00-23:00
20-
- alias: 'Rule 1 Light on in the evening'
21-
trigger:
22-
# Prefix the first line of each trigger configuration
23-
# with a '-' to enter multiple
24-
- platform: sun
25-
event: sunset
26-
offset: '-01:00:00'
27-
- platform: state
28-
entity_id: group.all_devices
29-
state: 'home'
30-
condition:
31-
# Prefix the first line of each condition configuration
32-
# with a '-'' to enter multiple
33-
- condition: state
34-
entity_id: group.all_devices
35-
state: 'home'
36-
- condition: time
37-
after: '16:00:00'
38-
before: '23:00:00'
39-
action:
40-
service: homeassistant.turn_on
41-
entity_id: group.living_room
20+
- alias: 'Rule 1 Light on in the evening'
21+
trigger:
22+
# Prefix the first line of each trigger configuration
23+
# with a '-' to enter multiple
24+
- platform: sun
25+
event: sunset
26+
offset: '-01:00:00'
27+
- platform: state
28+
entity_id: group.all_devices
29+
state: 'home'
30+
condition:
31+
# Prefix the first line of each condition configuration
32+
# with a '-'' to enter multiple
33+
- condition: state
34+
entity_id: group.all_devices
35+
state: 'home'
36+
- condition: time
37+
after: '16:00:00'
38+
before: '23:00:00'
39+
action:
40+
service: homeassistant.turn_on
41+
entity_id: group.living_room
4242

4343
# Turn off lights when everybody leaves the house
44-
- alias: 'Rule 2 - Away Mode'
45-
trigger:
46-
platform: state
47-
entity_id: group.all_devices
48-
state: 'not_home'
49-
action:
50-
service: light.turn_off
51-
entity_id: group.all_lights
44+
- alias: 'Rule 2 - Away Mode'
45+
trigger:
46+
platform: state
47+
entity_id: group.all_devices
48+
state: 'not_home'
49+
action:
50+
service: light.turn_off
51+
entity_id: group.all_lights
5252

5353
# Notify when Paulus leaves the house in the evening
54-
- alias: 'Leave Home notification'
55-
trigger:
56-
platform: zone
57-
event: leave
58-
zone: zone.home
59-
entity_id: device_tracker.paulus
60-
condition:
61-
condition: time
62-
after: '20:00'
63-
action:
64-
service: notify.notify
65-
data:
66-
message: 'Paulus left the house'
54+
- alias: 'Leave Home notification'
55+
trigger:
56+
platform: zone
57+
event: leave
58+
zone: zone.home
59+
entity_id: device_tracker.paulus
60+
condition:
61+
condition: time
62+
after: '20:00'
63+
action:
64+
service: notify.notify
65+
data:
66+
message: 'Paulus left the house'
6767
```

0 commit comments

Comments
 (0)