Closes #72 - Move IFTTT triggers locally to Input_booleans

This commit is contained in:
CCOSTAN
2017-02-23 21:50:00 +00:00
parent 3eb7f488b8
commit 0f1102fd68
7 changed files with 93 additions and 29 deletions

19
automation/flash_all.yaml Executable file
View File

@@ -0,0 +1,19 @@
######################################################################
## Turn off my Office light whenever I leave the house.
######################################################################
- alias: 'Carlo has left the building'
trigger:
- platform: state
entity_id: input_boolean.flash
state: 'on'
from: 'off'
action:
- service: light.turn_on
entity_id:
- group.all_lights
data:
flash: long
- service: input_boolean.turn_off
entity_id: input_boolean.flash

View File

@@ -4,8 +4,10 @@
- alias: 'Good Morning Routine'
trigger:
- platform: event
event_type: good_morning
- platform: state
entity_id: input_boolean.good_morning
state: 'on'
from: 'off'
- platform: state
entity_id:
- binary_sensor.sleepnumber_carlo_stacey_is_in_bed
@@ -38,3 +40,5 @@
- delay: 00:01:00
- service: switch.turn_on
entity_id: switch.kitchen_accents
- service: input_boolean.turn_off
entity_id: input_boolean.good_morning

View File

@@ -4,8 +4,10 @@
- alias: 'Good Night Trigger'
trigger:
- platform: event
event_type: good_night
- platform: state
entity_id: input_boolean.good_night
state: 'on'
from: 'off'
- platform: state
entity_id:
- binary_sensor.sleepnumber_carlo_carlo_is_in_bed
@@ -27,6 +29,9 @@
state: 'on'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.good_night
- service: script.Voice_notify
data_template:
value1: >

View File

@@ -4,8 +4,10 @@
- alias: Meal Time
trigger:
- platform: event
event_type: mealtime
- platform: state
entity_id: input_boolean.meal_time
state: 'on'
from: 'off'
action:
- service: light.turn_on
@@ -15,3 +17,5 @@
- service: light.turn_off
entity_id:
- group.living_room_lights
- service: input_boolean.turn_off
entity_id: input_boolean.meal_time

View File

@@ -7,8 +7,10 @@
- platform: sun
event: sunset
offset: '+01:00:00'
- platform: event
event_type: tv_time
- platform: state
entity_id: input_boolean.TV_time
state: 'on'
from: 'off'
- platform: state
entity_id: sensor.samsungtv
state: 'Online'
@@ -32,8 +34,10 @@
state: 'off'
action:
service: scene.turn_on
entity_id: scene.tv_time
- service: scene.turn_on
entity_id: scene.tv_time
- service: input_boolean.turn_off
entity_id: input_boolean.tv_time
######################################################################
## Turn off the Living room lights when the TV is turned off.

View File

@@ -4,8 +4,10 @@
- alias: Time to Work
trigger:
- platform: event
event_type: work
- platform: state
entity_id: input_boolean.work
state: 'on'
from: 'off'
action:
- service: light.turn_off
@@ -16,3 +18,5 @@
- service: light.turn_on
entity_id:
- light.office_lamp
- service: input_boolean.turn_off
entity_id: input_boolean.work

View File

@@ -0,0 +1,24 @@
#triggers
good_night:
name: Good Night
initial: off
good_morning:
name: Good Morning
initial: off
meal_time:
name: Meal Time
initial: off
tv_time:
name: TV Time
initial: off
work:
name: Work
initial: off
flash:
name: Flash
initial: off