From d05c0078b3bad8a8df3ea358a45dfde8d99dc35f Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Wed, 21 Dec 2016 21:38:29 +0000 Subject: [PATCH] Cloudy and Dark or just raining. Turnsome interior lights on. --- README.md | 2 +- automation/sunrise_turnon_and_off.yaml | 28 +++++++++++++++++--------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0c5538d3..6b43a8c7 100755 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Software on the Pi : [Home Assistant](https://home-assistant.io/) , [Dasher](htt * Turn on Upstairs light if Nest detects people and it's nighttime. * Turn off lights when Nest detects we are away. (Upstairs and Downstairs) * Turn on some lights abd switches when we get home -* Turn on some outdoor Lights at Sunset, Turn off 4 hours before sunrise. Turn off interior lights when we go to sleep. +* Turn on some outdoor Lights at Sunset or if it gets darkish in the house, Turn off 4 hours before sunrise. Turn off interior lights when we go to sleep. * Turn on lights during school days for a morning routine for the kids and wife. Has No School overide boolean in GUI. * Detects when lights are turned on and adjusts them to correct brightness based on time of day. * Leverage Alexa, IFTTT and Elekcity outlet to control Printer On/Off via Voice. Turns off automatically after 20 minutes. diff --git a/automation/sunrise_turnon_and_off.yaml b/automation/sunrise_turnon_and_off.yaml index 69290a7a..8d98ac2d 100755 --- a/automation/sunrise_turnon_and_off.yaml +++ b/automation/sunrise_turnon_and_off.yaml @@ -1,5 +1,3 @@ - - ################################### ## Dark House Little extra light ################################### @@ -13,16 +11,26 @@ - platform: numeric_state entity_id: sensor.dark_sky_cloud_coverage above: 90 + - platform: numeric_state + entity_id: sensor.dark_sky_precip_intensity + above: 1 condition: - - condition: numeric_state - entity_id: sun.sun - value_template: '{{ state.attributes.elevation }}' - below: 20.0 - - condition: numeric_state - entity_id: sensor.dark_sky_cloud_coverage - above: 90 - + condition: or + conditions: + - condition: and + conditions: + - condition: numeric_state + entity_id: sun.sun + value_template: '{{ state.attributes.elevation }}' + below: 20.0 + - condition: numeric_state + entity_id: sensor.dark_sky_cloud_coverage + above: 90 + - condition: numeric_state + entity_id: sensor.dark_sky_precip_intensity + above: 1 + action: - service: light.turn_on entity_id: