mirror of
https://github.com/thejeffreystone/home-assistant-configuration.git
synced 2025-08-29 09:04:46 +00:00
Updated the templates used for speech and twitter notifications
This commit is contained in:
38
templates/skylar_night.yaml
Normal file
38
templates/skylar_night.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
>
|
||||
{% macro getIntro() %}
|
||||
Skylar.
|
||||
{{ [ "This is your friendly neighborhood smart home ",
|
||||
"This is your digital life mate ",
|
||||
"This is your cruise director ",
|
||||
] | random }} with your end of day announcements.
|
||||
Bedtime is in thirty minutes.
|
||||
{% endmacro %}
|
||||
{% macro getPrebedRoutine() %}
|
||||
If you are taking a bath now is the time to get in the tub so you have time to brush teeth and read stories.
|
||||
Otherwise it is time to put on your pajamas.
|
||||
{% endmacro %}
|
||||
{% macro getReminders() %}
|
||||
Don't forget to feed your fish.
|
||||
{% if is_state("sensor.weekday", "fri") %}
|
||||
Oh, and tomorrow is the weekend, so why don't we sleep in.
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
||||
{%- macro cleanup(data) -%}
|
||||
{%- for item in data.split("\n") if item | trim != "" -%}
|
||||
{{ item | trim }} {% endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{# a macro to call all macros :) #}
|
||||
{%- macro mother_of_all_macros() -%}
|
||||
It is {{ now().strftime("%I:%M %p") }}.
|
||||
{{ getIntro() }}
|
||||
{{ getPrebedRoutine() }}
|
||||
{{ getReminders() }}
|
||||
|
||||
{%- endmacro -%}
|
||||
|
||||
{# Call the macro #}
|
||||
{{- cleanup(mother_of_all_macros()) -}}
|
Reference in New Issue
Block a user