Minor tweeks to work better with Amazon Polly
This commit is contained in:
parent
02c68766b9
commit
6756f34a02
|
@ -2,10 +2,11 @@
|
|||
{% macro getGreeting() %}
|
||||
{{ [ "Good morning Anchorage House. Rise and Shine. ",
|
||||
"Good morning everyone. ",
|
||||
"Good morning. The early bird gets the worm. And look over there. A worm. Wait, is that a snake. umm, someone might want to take care, ok, moving on.",
|
||||
"Good morning. The early bird gets the worm. And look over there. A worm. Wait, is that a snake? umm,,,I don't like snakes. Someone might want to take care,, ok,,, moving on.",
|
||||
"Good morning. The early bird gets the worm.",
|
||||
"Good morning from the bridge.",
|
||||
"I hope I am not waking you, but I think this would be a good time for the morning report."
|
||||
"Pardom the interuption.",
|
||||
"I hope I am not interupting, but I think this would be a good time for the morning report."
|
||||
] | random }}
|
||||
{% if is_state("input_boolean.guest_mode", "on") %}
|
||||
{{ [ "And a special welcome to our guests. ",
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
>
|
||||
{% macro getSnark() %}
|
||||
{{ [ "Good evening, ",
|
||||
"Before we shut this party down, ",
|
||||
"Pardon the interuption, ",
|
||||
"Good Evening Anchorage House, "
|
||||
] | random }}
|
||||
{{ [ "I thought you might like to know. ",
|
||||
"I might have some bad news for you.",
|
||||
"Just one more thing."
|
||||
"Here is the nightly report.",
|
||||
"Before I call it a day I wanted to let you know,"
|
||||
] | random }}
|
||||
{% endmacro %}
|
||||
{% macro getForecast() %}
|
||||
|
@ -14,7 +14,10 @@
|
|||
{% endmacro %}
|
||||
{% macro getTrashDay() %}
|
||||
{% if is_state("sensor.weekday", "mon") %}
|
||||
Don't forget Tomorrow is trash day!
|
||||
{{ [ "Don't forget tomorrow is Trash Day. ",
|
||||
"I advise you move the trash cans to the curb for the weekly pickup. ",
|
||||
" The trash and recycle should go out"
|
||||
] | random }}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro getBirthdays() %}
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
>
|
||||
{% macro getForecast() %}
|
||||
The low tonight will be {{states.sensor.dark_sky_overnight_low_temperature_0.state | round}} degrees and there is a {{states.sensor.dark_sky_precip_probability_0.state|round}} percent chance of rain.
|
||||
{% endmacro %}
|
||||
{% macro getTrashDay() %}
|
||||
{% if is_state("sensor.weekday", "mon") %}
|
||||
Tomorrow is trash day!
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro getBirthdays() %}
|
||||
{% if states.sensor.birthday_skylar.state | int < 2 %}
|
||||
Tomorrow is Skylar's Birthday.
|
||||
{% endif %}
|
||||
{% if states.sensor.birthday_jeff.state | int < 2 %}
|
||||
Tomorrow is Jeff's Birthday.
|
||||
{% endif %}
|
||||
{% if states.sensor.birthday_kat.state | int < 2 %}
|
||||
Tomorrow is Katherine's Birthday.
|
||||
{% endif %}
|
||||
{% if states.sensor.anniversary_our_wedding.state | int < 2 %}
|
||||
Tomorrow is Jeff and Katherine's Wedding Anniversary.
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro getHolidays() %}
|
||||
{% if states.sensor.holiday_halloween.state | int < 2 %}
|
||||
Tomorrow is Halloween. Hope you have picked out a costume.
|
||||
{% endif %}
|
||||
{% if states.sensor.holiday_christmas.state | int < 2 %}
|
||||
Tomorrow is Christmas. It's practically here!
|
||||
{% 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") }}.
|
||||
{{ getForecast() }}
|
||||
{{ getTrashDay() }}
|
||||
{{ getBirthdays() }}
|
||||
{{ getHolidays() }}
|
||||
|
||||
{%- endmacro -%}
|
||||
|
||||
{# Call the macro #}
|
||||
{{- cleanup(mother_of_all_macros()) -}}
|
|
@ -1,16 +1,20 @@
|
|||
>
|
||||
{% macro getIntro() %}
|
||||
Skylar.
|
||||
{{ [ "This is your friendly neighborhood smart home ",
|
||||
"This is your digital life mate ",
|
||||
"This is your cruise director ",
|
||||
] | random }} with your morning announcements.
|
||||
|
||||
{{ [ "Pardom me, Skylar,, ",
|
||||
"Good morning Skylar, This is your digital life mate, Jarvis ",
|
||||
"This is your cruise director with your morning announcements.",
|
||||
] | random }}
|
||||
{% endmacro %}
|
||||
{% macro getDressed() %}
|
||||
{% if is_state("sensor.birthday_skylar", "0") %}
|
||||
First, Happy Birthday Skylar! Second, even birthday boys have to get dressed. So get to it.
|
||||
{% else %}
|
||||
It is time to get dressed.
|
||||
If you haven't gotten dressed,
|
||||
{{ [ "It is time to get dressed. ",
|
||||
"It is time to put some real clothes on. ",
|
||||
"it is now time to change your underwear.",
|
||||
] | random }}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% macro getSchoolDay() %}
|
||||
|
|
Loading…
Reference in New Issue