From d670e6fec029d1b87f7a2e46ddc0e972094ba25c Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Sun, 30 Oct 2016 20:00:26 +0000 Subject: [PATCH] Lighting 'scenes' hidden in automation --- automation/ghost_race.yaml | 38 ++++++++++++++++++++++++++++++++++++++ automation/mealtime.yaml | 18 ++++++++++++++++++ automation/work.yaml | 18 ++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100755 automation/ghost_race.yaml create mode 100755 automation/mealtime.yaml create mode 100755 automation/work.yaml diff --git a/automation/ghost_race.yaml b/automation/ghost_race.yaml new file mode 100755 index 00000000..41ab96bf --- /dev/null +++ b/automation/ghost_race.yaml @@ -0,0 +1,38 @@ +###################################################################### +## TV Time at sunset or 8pm. Whichever is later. +###################################################################### + +- alias: TV Time + trigger: + - platform: sun + event: sunset + offset: '+01:00:00' + - platform: event + event_type: tv_time + - platform: state + entity_id: sensor.samsungtv + state: Online + - platform: time + after: '20:00:00' + + condition: + condition: and + conditions: + - condition: state + entity_id: group.family + state: home + - condition: state + entity_id: sensor.samsungtv + state: Online + - condition: state + entity_id: sun.sun + state: 'below_horizon' + - condition: state + entity_id: input_boolean.guest_mode + state: 'off' + - condition: time + after: '20:00:00' + + action: + service: scene.turn_on + entity_id: scene.living_room_tv_time diff --git a/automation/mealtime.yaml b/automation/mealtime.yaml new file mode 100755 index 00000000..de9d6e2f --- /dev/null +++ b/automation/mealtime.yaml @@ -0,0 +1,18 @@ +###################################################################### +## Time to eat - Set it up! +###################################################################### + +- alias: Mealtime + trigger: + - platform: event + event_type: mealtime + + action: + - service: light.turn_on + entity_id: + - group.dinette + - group.kitchen + - service: light.turn_off + entity_id: + - light.office_lamp + - group.living_room \ No newline at end of file diff --git a/automation/work.yaml b/automation/work.yaml new file mode 100755 index 00000000..ffccf89f --- /dev/null +++ b/automation/work.yaml @@ -0,0 +1,18 @@ +###################################################################### +## Time to work - Set it up! +###################################################################### + +- alias: Time to Work + trigger: + - platform: event + event_type: work + + action: + - service: light.turn_off + entity_id: + - group.dinette + - group.kitchen + - group.living_room + - service: light.turn_on + entity_id: + - light.office_lamp