2018-01-02 00:00:45 +00:00
######################################################################
## Dark House Little extra light - DARK and Cloudy or just rainy.
######################################################################
- alias : 'Dark House Little extra light'
trigger :
2020-06-03 21:32:55 +00:00
- platform : state
2018-01-02 00:00:45 +00:00
entity_id : sun.sun
2020-06-03 21:32:55 +00:00
to : below_horizon
2018-01-02 00:00:45 +00:00
- platform : numeric_state
entity_id : sensor.dark_sky_cloud_coverage
above : 90
2020-06-04 13:58:11 +00:00
- platform : state
entity_id : sensor.dark_sky_precip
to : 'rain'
2018-01-02 00:00:45 +00:00
- platform : state
entity_id : group.family
to : 'home'
from : 'not_home'
2020-06-04 13:51:40 +00:00
- platform : state
entity_id : binary_sensor.sleepnumber_carlo_carlo_is_in_bed
2020-06-04 13:54:14 +00:00
to : 'off'
for : "00:10:00"
2018-01-02 00:00:45 +00:00
condition :
condition : and
conditions :
- condition : or
conditions :
2020-06-03 21:32:55 +00:00
- condition : numeric_state
entity_id : sensor.dark_sky_cloud_coverage
above : 90
2020-06-04 13:58:11 +00:00
- condition : state
entity_id : sensor.dark_sky_precip
state : 'rain'
2018-01-02 00:00:45 +00:00
- condition : state
entity_id : binary_sensor.sleepnumber_carlo_carlo_is_in_bed
state : 'off'
- condition : state
entity_id : binary_sensor.sleepnumber_carlo_stacey_is_in_bed
state : 'off'
- condition : state
entity_id : sun.sun
state : 'above_horizon'
- condition : state
entity_id : group.family
state : 'home'
2020-06-07 18:07:19 +00:00
- condition : template # Only run once every ~3 hours tops.
value_template : >
{%- if states.automation.dark_house_little_extra_light.attributes.last_triggered -%}
{{ (as_timestamp(now()) - as_timestamp(states.automation.dark_house_little_extra_light.attributes.last_triggered)) > 10000 }}
{%- else -%}
true
{%- endif -%}
2018-01-02 00:00:45 +00:00
action :
- service : light.turn_on
entity_id :
- light.couch_1
- light.sink
- service : input_boolean.turn_on
entity_id :
- input_boolean.daylight_override
- service : script.speech_engine
data_template :
value1 : "It is getting a little dark inside the house because of the {{trigger.entity_id.split('_')[2]|replace('precip','rain') }} {{trigger.entity_id.split('_')[3]|replace('intensity',' ')}} outside. I will turn on some extra lights in the living room."
call_window_check : 1
call_garage_check : 1
######################################################################