From 3763de3d93ae009130d7b0daad3a8fc932deb477 Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Mon, 20 Feb 2017 00:43:36 +0000 Subject: [PATCH] Fixed this to only work if the sun is actually out. --- automation/dark_rainy_day.yaml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/automation/dark_rainy_day.yaml b/automation/dark_rainy_day.yaml index bd3534df..71aed8c5 100755 --- a/automation/dark_rainy_day.yaml +++ b/automation/dark_rainy_day.yaml @@ -2,7 +2,7 @@ ## Dark House Little extra light - DARK and Cloudy or just rainy. ###################################################################### -- alias: 'Dark House Little extra light' +- alias: 'Dark House Little extra light' trigger: - platform: numeric_state entity_id: sun.sun @@ -14,7 +14,7 @@ - platform: numeric_state entity_id: sensor.dark_sky_precip_intensity above: 1 - + condition: condition: or conditions: @@ -30,10 +30,10 @@ - condition: numeric_state entity_id: sensor.dark_sky_precip_intensity above: 1 - + action: - service: light.turn_on - entity_id: + entity_id: - light.couch_1 - light.sink - service: script.Voice_notify @@ -47,19 +47,22 @@ ## Dark House Little extra light - RAIN is over. ###################################################################### -- alias: 'Rain is over' +- alias: 'Rain is over' trigger: - platform: numeric_state entity_id: sensor.dark_sky_precip_intensity below: 1 - + + condition: + - condition: state + entity_id: sun.sun + state: 'above_horizon' + action: - service: light.turn_off - entity_id: + entity_id: - light.couch_1 - light.sink - data: - transition: 1200 - service: script.Voice_notify data_template: - value1: "The sun is back out. Let's turn down these lights now." \ No newline at end of file + value1: "The sun is back out. Let's turn down these lights now."