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,10 +4,12 @@
- alias: 'Good Morning Routine' - alias: 'Good Morning Routine'
trigger: trigger:
- platform: event
event_type: good_morning
- platform: state - platform: state
entity_id: entity_id: input_boolean.good_morning
state: 'on'
from: 'off'
- platform: state
entity_id:
- binary_sensor.sleepnumber_carlo_stacey_is_in_bed - binary_sensor.sleepnumber_carlo_stacey_is_in_bed
state: 'off' state: 'off'
@@ -38,3 +40,5 @@
- delay: 00:01:00 - delay: 00:01:00
- service: switch.turn_on - service: switch.turn_on
entity_id: switch.kitchen_accents 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' - alias: 'Good Night Trigger'
trigger: trigger:
- platform: event - platform: state
event_type: good_night entity_id: input_boolean.good_night
state: 'on'
from: 'off'
- platform: state - platform: state
entity_id: entity_id:
- binary_sensor.sleepnumber_carlo_carlo_is_in_bed - binary_sensor.sleepnumber_carlo_carlo_is_in_bed
@@ -27,6 +29,9 @@
state: 'on' state: 'on'
action: action:
- service: input_boolean.turn_off
entity_id: input_boolean.good_night
- service: script.Voice_notify - service: script.Voice_notify
data_template: data_template:
value1: > value1: >

View File

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

View File

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

View File

@@ -1,18 +1,22 @@
###################################################################### ######################################################################
## Time to work - Set it up! ## Time to work - Set it up!
###################################################################### ######################################################################
- alias: Time to Work - alias: Time to Work
trigger: trigger:
- platform: event - platform: state
event_type: work entity_id: input_boolean.work
state: 'on'
action: from: 'off'
- service: light.turn_off
entity_id: action:
- group.dinette_lights - service: light.turn_off
- group.kitchen_lights entity_id:
- group.living_room_lights - group.dinette_lights
- service: light.turn_on - group.kitchen_lights
entity_id: - group.living_room_lights
- light.office_lamp - 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