Fix indentation and remove use_trigger_values (fixes #2306) (#2313)

This commit is contained in:
Fabian Affolter 2017-03-21 20:44:47 +01:00 committed by GitHub
parent 48084ee55e
commit e4246aa25a
3 changed files with 99 additions and 109 deletions

View File

@ -27,12 +27,10 @@ automation:
- platform: state - platform: state
entity_id: group.all_devices entity_id: group.all_devices
state: 'not_home' state: 'not_home'
condition: condition:
- platform: state - platform: state
entity_id: sun.sun entity_id: sun.sun
state: 'above_horizon' state: 'above_horizon'
action: action:
service: ifttt.trigger service: ifttt.trigger
data: {"event":"manything_on"} data: {"event":"manything_on"}
@ -44,12 +42,10 @@ automation:
- platform: state - platform: state
entity_id: group.all_devices entity_id: group.all_devices
state: 'home' state: 'home'
- platform: state condition:
- condition: state
entity_id: sun.sun entity_id: sun.sun
state: 'above_horizon' state: 'above_horizon'
condition: use_trigger_values
action: action:
service: ifttt.trigger service: ifttt.trigger
data: {"event":"manything_off"} data: {"event":"manything_off"}
@ -73,4 +69,3 @@ domain | `ifttt`
service | `trigger` service | `trigger`
Service Data | `{"event": "manything_on"}` Service Data | `{"event": "manything_on"}`

View File

@ -16,21 +16,18 @@ Turn on a light in the living room when it starts raining, someone is home, and
```yaml ```yaml
automation: automation:
alias: 'Rainy Day' - alias: 'Rainy Day'
trigger: trigger:
- platform: state - platform: state
entity_id: sensor.precip_intensity entity_id: sensor.precip_intensity
state: 'rain' state: 'rain'
condition:
- platform: state - platform: state
entity_id: group.all_devices entity_id: group.all_devices
state: 'home' state: 'home'
- platform: time - platform: time
after: '14:00' after: '14:00'
before: '23:00' before: '23:00'
condition: use_trigger_values
action: action:
service: light.turn_on service: light.turn_on
entity_id: light.couch_lamp entity_id: light.couch_lamp
@ -39,17 +36,15 @@ automation:
And then of course turn off the lamp when it stops raining but only if it's within an hour before sunset. And then of course turn off the lamp when it stops raining but only if it's within an hour before sunset.
```yaml ```yaml
automation 2: - alias: 'Rain is over'
alias: 'Rain is over'
trigger: trigger:
- platform: state - platform: state
entity_id: sensor.precip_intensity entity_id: sensor.precip_intensity
state: 'None' state: 'None'
- platform: sun condition:
event: 'sunset' - condition: sun
after: 'sunset'
offset: '-01:00:00' offset: '-01:00:00'
condition: use_trigger_values
action: action:
service: light.turn_off service: light.turn_off
entity_id: light.couch_lamp entity_id: light.couch_lamp