From cd71193b870dae6fd6d5e60179211df81f45d34b Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Sun, 19 Feb 2017 21:04:05 +0000 Subject: [PATCH] Needed some sunlight conditions for the good night routine. --- automation/dash_buttons.yaml | 18 +----------------- automation/good_night.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/automation/dash_buttons.yaml b/automation/dash_buttons.yaml index ebea0b55..5275f2a8 100755 --- a/automation/dash_buttons.yaml +++ b/automation/dash_buttons.yaml @@ -8,23 +8,7 @@ event_type: brooklyn_dash - platform: event event_type: simplehuman_dash - + action: - service: light.toggle entity_id: light.office_lamp - - -# - alias: 'Toggle Office Light off if on' - # trigger: - # - platform: event - # event_type: brooklyn_dash - - # condition: - # - condition: state - # entity_id: light.office_lamp - # state: 'on' - - # action: - # - service: light.turn_off - # entity_id: light.office_lamp - \ No newline at end of file diff --git a/automation/good_night.yaml b/automation/good_night.yaml index 54178974..dad2d4b2 100755 --- a/automation/good_night.yaml +++ b/automation/good_night.yaml @@ -7,12 +7,15 @@ - platform: event event_type: good_night - platform: state - entity_id: + entity_id: - binary_sensor.sleepnumber_carlo_carlo_is_in_bed - binary_sensor.sleepnumber_carlo_stacey_is_in_bed state: 'on' condition: + - condition: state + entity_id: sun.sun + state: 'below_horizon' - condition: state entity_id: input_boolean.guest_mode state: 'off' @@ -22,7 +25,7 @@ - condition: state entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed state: 'on' - + action: - service: script.Voice_notify data_template: @@ -38,6 +41,3 @@ "Stuff your worries in your pillow, wrap your troubles in your blanket and spread your anxieties on your sheets. When you wake up tomorrow, you may have dirty linen, but more importantly, you’ll have a fresh mind and a happy heart. Good night." ] | random }} - service: script.interior_off - - - \ No newline at end of file