Fixed this to only work if the sun is actually out.

This commit is contained in:
CCOSTAN
2017-02-20 00:43:36 +00:00
parent cd71193b87
commit 3763de3d93

View File

@@ -2,7 +2,7 @@
## Dark House Little extra light - DARK and Cloudy or just rainy. ## Dark House Little extra light - DARK and Cloudy or just rainy.
###################################################################### ######################################################################
- alias: 'Dark House Little extra light' - alias: 'Dark House Little extra light'
trigger: trigger:
- platform: numeric_state - platform: numeric_state
entity_id: sun.sun entity_id: sun.sun
@@ -14,7 +14,7 @@
- platform: numeric_state - platform: numeric_state
entity_id: sensor.dark_sky_precip_intensity entity_id: sensor.dark_sky_precip_intensity
above: 1 above: 1
condition: condition:
condition: or condition: or
conditions: conditions:
@@ -30,10 +30,10 @@
- condition: numeric_state - condition: numeric_state
entity_id: sensor.dark_sky_precip_intensity entity_id: sensor.dark_sky_precip_intensity
above: 1 above: 1
action: action:
- service: light.turn_on - service: light.turn_on
entity_id: entity_id:
- light.couch_1 - light.couch_1
- light.sink - light.sink
- service: script.Voice_notify - service: script.Voice_notify
@@ -47,19 +47,22 @@
## Dark House Little extra light - RAIN is over. ## Dark House Little extra light - RAIN is over.
###################################################################### ######################################################################
- alias: 'Rain is over' - alias: 'Rain is over'
trigger: trigger:
- platform: numeric_state - platform: numeric_state
entity_id: sensor.dark_sky_precip_intensity entity_id: sensor.dark_sky_precip_intensity
below: 1 below: 1
condition:
- condition: state
entity_id: sun.sun
state: 'above_horizon'
action: action:
- service: light.turn_off - service: light.turn_off
entity_id: entity_id:
- light.couch_1 - light.couch_1
- light.sink - light.sink
data:
transition: 1200
- service: script.Voice_notify - service: script.Voice_notify
data_template: data_template:
value1: "The sun is back out. Let's turn down these lights now." value1: "The sun is back out. Let's turn down these lights now."