2017-02-07 06:09:31 +00:00
######################################################################
2017-02-07 06:11:25 +00:00
## Some home facts when we get back home from being away.
2017-02-07 06:09:31 +00:00
######################################################################
- alias : 'Home Stats'
trigger :
- platform : state
entity_id :
- group.family
from : 'not_home'
to : 'home'
2017-02-07 06:11:25 +00:00
for : '00:03:00'
2017-02-07 06:09:31 +00:00
action :
- service : script.Voice_notify
data_template :
value1 : >
"Welcome Home {{ trigger.entity_id.split('.')[1]|replace('_', ' ') }}. Here are the main points for today:
{%if now().strftime("%a") == 'Wed' or now().strftime("%a") == 'Sun'%}
2017-02-09 04:14:00 +00:00
Today is {{now().strftime("%A")}} and {{now().strftime("%A")}} is garbage day. Please be sure to tell the kids to take out the trash.
2017-02-07 06:09:31 +00:00
{%endif%}
2017-02-07 21:53:28 +00:00
Inside the house, it is {{ states.climate.downstairs.attributes["current_temperature"]}} degrees with around {{states('sensor.downstairs_thermostat_humidity')}} percent humidity. Outside, it is going to be {{states('sensor.dark_sky_minutely_summary')}}
2017-02-07 06:09:31 +00:00
{% if is_state('cover.garadget_large', 'open') -%}
Also, The Large Garage Door is still open
{% endif -%}
{% if is_state('cover.garadget_small', 'open') -%}
{% if is_state('cover.garadget_large', 'open') -%}and
{%- endif %} The small Garage Door is still open.
2017-02-07 21:53:28 +00:00
{% endif %}
2017-02-09 04:14:00 +00:00
. There are
2017-02-07 21:53:28 +00:00
{% for state in states.light if state.state == 'on' -%}
{%- if loop.last -%}
{{ loop.index }}
{%- endif -%}
{%- endfor %} lights on right now."