mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-17 02:54:41 +00:00
#56 - Testing out moving speech logic into ONE script.
This commit is contained in:
@@ -1 +1 @@
|
|||||||
0.42.2
|
0.42.3
|
@@ -11,20 +11,4 @@
|
|||||||
from: 'off'
|
from: 'off'
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- service: input_boolean.turn_off
|
|
||||||
entity_id: input_boolean.responsibilities
|
|
||||||
|
|
||||||
- service: script.Voice_notify
|
- service: script.Voice_notify
|
||||||
data_template:
|
|
||||||
value1: >
|
|
||||||
{%- macro responsibilities() -%}
|
|
||||||
{%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 -%}
|
|
||||||
"{{responsibilities()}}"
|
|
||||||
|
@@ -31,7 +31,5 @@
|
|||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
entity_id:
|
entity_id:
|
||||||
- group.dining_room_lights
|
- group.dining_room_lights
|
||||||
data:
|
|
||||||
transition: 600
|
|
||||||
- service: switch.turn_off
|
- service: switch.turn_off
|
||||||
entity_id: switch.kitchen_accents
|
entity_id: switch.kitchen_accents
|
||||||
|
@@ -21,8 +21,9 @@
|
|||||||
- wed
|
- wed
|
||||||
- thu
|
- thu
|
||||||
- fri
|
- fri
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
entity_id:
|
entity_id:
|
||||||
- group.interior_lights
|
- group.interior_lights
|
||||||
|
- service: switch.turn_off
|
||||||
|
entity_id: switch.kitchen_accents
|
||||||
|
@@ -81,6 +81,25 @@ voice_notify:
|
|||||||
{% else %}
|
{% else %}
|
||||||
"Good evening.
|
"Good evening.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%- macro responsibilities() -%}
|
||||||
|
{%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("%a") == 'Wed'%}
|
||||||
|
Both Recycling and regular Garbage goes out. Please take out all of the garbage cans tonight.
|
||||||
|
{%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 -%}
|
||||||
|
|
||||||
|
{% if is_state('input_boolean.responsibilities', 'on') %}
|
||||||
|
{{responsibilities()}}
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
{{ value1 }}"
|
{{ value1 }}"
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
@@ -88,3 +107,4 @@ voice_notify:
|
|||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.last_message
|
- input_boolean.last_message
|
||||||
- input_boolean.alert_mode
|
- input_boolean.alert_mode
|
||||||
|
- input_boolean.responsibilities
|
||||||
|
Reference in New Issue
Block a user