diff --git a/atom.xml b/atom.xml index bde8f70a6b..bc742ce8e2 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
After setting up IFTTT, Maker Channel and ManyThing Channel, you can use the following examples to configure Home Assistant.
# Example configuration.yaml entry
automation:
-- alias: 'ManyThing Recording ON'
- # This calls an IFTTT recipe to turn on recording of the ManyThing Camera
- # if we leave the house during the day.
- trigger:
- - platform: state
- entity_id: group.all_devices
- state: 'not_home'
+ - alias: 'ManyThing Recording ON'
+ # This calls an IFTTT recipe to turn on recording of the ManyThing Camera
+ # if we leave the house during the day.
+ trigger:
+ - platform: state
+ entity_id: group.all_devices
+ state: 'not_home'
+ condition:
+ - platform: state
+ entity_id: sun.sun
+ state: 'above_horizon'
+ action:
+ service: ifttt.trigger
+ data: {"event":"manything_on"}
- condition:
- - platform: state
- entity_id: sun.sun
- state: 'above_horizon'
-
- action:
- service: ifttt.trigger
- data: {"event":"manything_on"}
-
-- alias: 'ManyThing Recording OFF'
- # This calls an IFTTT recipe to turn off recording of the ManyThing Camera
- # when we are home unless it's nighttime.
- trigger:
- - platform: state
- entity_id: group.all_devices
- state: 'home'
- - platform: state
- entity_id: sun.sun
- state: 'above_horizon'
-
- condition: use_trigger_values
-
- action:
- service: ifttt.trigger
- data: {"event":"manything_off"}
+ - alias: 'ManyThing Recording OFF'
+ # This calls an IFTTT recipe to turn off recording of the ManyThing Camera
+ # when we are home unless it's nighttime.
+ trigger:
+ - platform: state
+ entity_id: group.all_devices
+ state: 'home'
+ condition:
+ - condition: state
+ entity_id: sun.sun
+ state: 'above_horizon'
+ action:
+ service: ifttt.trigger
+ data: {"event":"manything_off"}
-You need to setup a unique trigger for each event you sent to IFTTT.
+You need to setup a unique trigger for each event you sent to IFTTT.
For ManyThing support, you need to set up an
on
and off
event.
This requires a Dark Sky sensor with the condition precip_intensity
that tells if it’s raining or not. You could also experiment with other attributes such as cloud_cover
.
Turn on a light in the living room when it starts raining, someone is home, and it’s afternoon or later.
automation:
- alias: 'Rainy Day'
-
- trigger:
- - platform: state
- entity_id: sensor.precip_intensity
- state: 'rain'
- - platform: state
- entity_id: group.all_devices
- state: 'home'
- - platform: time
- after: '14:00'
- before: '23:00'
-
- condition: use_trigger_values
-
- action:
- service: light.turn_on
- entity_id: light.couch_lamp
+ - alias: 'Rainy Day'
+ trigger:
+ - platform: state
+ entity_id: sensor.precip_intensity
+ state: 'rain'
+ condition:
+ - platform: state
+ entity_id: group.all_devices
+ state: 'home'
+ - platform: time
+ after: '14:00'
+ before: '23:00'
+ action:
+ service: light.turn_on
+ entity_id: light.couch_lamp
And then of course turn off the lamp when it stops raining but only if it’s within an hour before sunset.
-automation 2:
- alias: 'Rain is over'
- trigger:
- - platform: state
- entity_id: sensor.precip_intensity
- state: 'None'
- - platform: sun
- event: 'sunset'
- offset: '-01:00:00'
-
- condition: use_trigger_values
- action:
- service: light.turn_off
- entity_id: light.couch_lamp
+ - alias: 'Rain is over'
+ trigger:
+ - platform: state
+ entity_id: sensor.precip_intensity
+ state: 'None'
+ condition:
+ - condition: sun
+ after: 'sunset'
+ offset: '-01:00:00'
+ action:
+ service: light.turn_off
+ entity_id: light.couch_lamp
diff --git a/docs/automation/examples/index.html b/docs/automation/examples/index.html
index 6482670823..578f86707a 100644
--- a/docs/automation/examples/index.html
+++ b/docs/automation/examples/index.html
@@ -72,53 +72,53 @@
automation:
# Turns on lights 1 hour before sunset if people are home
# and if people get home between 16:00-23:00
-- alias: 'Rule 1 Light on in the evening'
- trigger:
- # Prefix the first line of each trigger configuration
- # with a '-' to enter multiple
- - platform: sun
- event: sunset
- offset: '-01:00:00'
- - platform: state
- entity_id: group.all_devices
- state: 'home'
- condition:
- # Prefix the first line of each condition configuration
- # with a '-'' to enter multiple
- - condition: state
- entity_id: group.all_devices
- state: 'home'
- - condition: time
- after: '16:00:00'
- before: '23:00:00'
- action:
- service: homeassistant.turn_on
- entity_id: group.living_room
+ - alias: 'Rule 1 Light on in the evening'
+ trigger:
+ # Prefix the first line of each trigger configuration
+ # with a '-' to enter multiple
+ - platform: sun
+ event: sunset
+ offset: '-01:00:00'
+ - platform: state
+ entity_id: group.all_devices
+ state: 'home'
+ condition:
+ # Prefix the first line of each condition configuration
+ # with a '-'' to enter multiple
+ - condition: state
+ entity_id: group.all_devices
+ state: 'home'
+ - condition: time
+ after: '16:00:00'
+ before: '23:00:00'
+ action:
+ service: homeassistant.turn_on
+ entity_id: group.living_room
# Turn off lights when everybody leaves the house
-- alias: 'Rule 2 - Away Mode'
- trigger:
- platform: state
- entity_id: group.all_devices
- state: 'not_home'
- action:
- service: light.turn_off
- entity_id: group.all_lights
+ - alias: 'Rule 2 - Away Mode'
+ trigger:
+ platform: state
+ entity_id: group.all_devices
+ state: 'not_home'
+ action:
+ service: light.turn_off
+ entity_id: group.all_lights
# Notify when Paulus leaves the house in the evening
-- alias: 'Leave Home notification'
- trigger:
- platform: zone
- event: leave
- zone: zone.home
- entity_id: device_tracker.paulus
- condition:
- condition: time
- after: '20:00'
- action:
- service: notify.notify
- data:
- message: 'Paulus left the house'
+ - alias: 'Leave Home notification'
+ trigger:
+ platform: zone
+ event: leave
+ zone: zone.home
+ entity_id: device_tracker.paulus
+ condition:
+ condition: time
+ after: '20:00'
+ action:
+ service: notify.notify
+ data:
+ message: 'Paulus left the house'