diff --git a/automation/Speech/chores.yaml b/automation/Speech/chores.yaml index ef630863..8e841036 100755 --- a/automation/Speech/chores.yaml +++ b/automation/Speech/chores.yaml @@ -1,5 +1,5 @@ ###################################################################### -## Some home facts when we get back home from being away. +## Who's day is it anyway? Pretty sure my parent's didn't code to figure this out. ###################################################################### - alias: 'chores' @@ -17,8 +17,14 @@ - service: script.Voice_notify data_template: value1: > - "{% if now().strftime("%j")|int % 2 == 0 %} - Today is Justin's day to do chores. - {% else %} - Today is Paige's day to do chores. - {%endif%}" + {%- macro chore_schedule() -%} + {%if now().strftime("%a") == 'Wed' or now().strftime("%a") == 'Sun'%} + Today is {{now().strftime("%A")}} and {{now().strftime("%A")}} is garbage day. + {%endif%} + {% if now().strftime("%j")|int % 2 != 0 %} + Today is Justin's day to do the chores. + {% else %} + Today is Paige's day to do the chores. + {%endif%} + {%- endmacro -%} + "{{chore_schedule()}}" diff --git a/automation/Speech/home_news.yaml b/automation/Speech/home_news.yaml index ed14b163..a06f0db2 100755 --- a/automation/Speech/home_news.yaml +++ b/automation/Speech/home_news.yaml @@ -19,14 +19,22 @@ action: - service: input_boolean.turn_off entity_id: input_boolean.home_news - + - service: script.Voice_notify data_template: value1: > "Welcome Home Costanzo Family. Here is what's going on around the house right now: - {%if now().strftime("%a") == 'Wed' or now().strftime("%a") == 'Sun'%} - Today is {{now().strftime("%A")}} and {{now().strftime("%A")}} is garbage day. Please be sure to tell the kids to take out the trash. - {%endif%} + {%- macro chore_schedule() -%} + {%if now().strftime("%a") == 'Wed' or now().strftime("%a") == 'Sun'%} + Today is {{now().strftime("%A")}} and {{now().strftime("%A")}} is garbage day. + {%endif%} + {% if now().strftime("%j")|int % 2 != 0 %} + Today is Justin's day to do the chores. + {% else %} + Today is Paige's day to do the chores. + {%endif%} + {%- endmacro -%} + {{chore_schedule()}} 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')}} {% if is_state('cover.garadget_large', 'open') -%} Also, The Large Garage Door is still open