Ok, now added words, school holiday, and some weekly events

This commit is contained in:
Jeffrey Stone 2019-11-11 22:10:04 -05:00
parent abe48763af
commit 11a81daf49
1 changed files with 33 additions and 23 deletions

View File

@ -197,7 +197,6 @@ script:
{% endif %} {% endif %}
message: >- message: >-
<speak> <speak>
<break time="1.0s" />
{{ message }} {{ message }}
</speak> </speak>
cache: true cache: true
@ -347,6 +346,8 @@ script:
] | random }} ] | random }}
{% endmacro %} {% endmacro %}
{% macro morning_greeting() %} {% macro morning_greeting() %}
{{ [ "Time to Rise and Shine. ", {{ [ "Time to Rise and Shine. ",
"Let's do this thing.", "Let's do this thing.",
@ -411,7 +412,7 @@ script:
{% if is_state("sensor.halloween_countdown","0") %} {% if is_state("sensor.halloween_countdown","0") %}
Happy Halloween! Happy Halloween!
{% endif %} {% endif %}
{% if is_state("sensor.holiday_christmas","0") %} {% if is_state("sensor.christmas_down","0") %}
Merry Christmas Everyone! Merry Christmas Everyone!
{% endif %} {% endif %}
{% if is_state("sensor.anniversary_our_wedding","0") %} {% if is_state("sensor.anniversary_our_wedding","0") %}
@ -488,13 +489,13 @@ script:
{% endmacro %} {% endmacro %}
{% macro upcoming_holidays() %} {% macro upcoming_holidays() %}
{% if states.sensor.holiday_halloween.state | int == 1 %} {% if states.sensor.halloween_countdown.state | int == 1 %}
Tomorrow is Halloween. I hope you have picked out a costume. Tomorrow is Halloween. I hope you have picked out a costume.
{{ [ "I will be going as a dumb home. ", {{ [ "I will be going as a dumb home. ",
"I have prepped the scary music. Just in case.", "I have prepped the scary music. Just in case.",
"I will be going as HAL 9000. The Pod Bay Doors are being installed today." "I will be going as HAL 9000. The Pod Bay Doors are being installed today."
] | random }} ] | random }}
{% elif states.sensor.holiday_halloween.state | int < 30 %} {% elif states.sensor.halloween_countdown.state | int < 30 %}
There are only {{states.sensor.holiday_halloween.state}} days There are only {{states.sensor.holiday_halloween.state}} days
{{ [ "until Halloween.", {{ [ "until Halloween.",
"until Halloween. It might not be enough time. ", "until Halloween. It might not be enough time. ",
@ -505,10 +506,15 @@ script:
{% else %} {% else %}
{% endif %} {% endif %}
{% if states.sensor.holiday_christmas.state | int == 1 %} {% if states.sensor.christmas_countdown.state | int == 1 %}
Tomorrow is Christmas. It's practically here! Santa is coming tonight! Don't forget the cookies! Tomorrow is Christmas. It's practically here! Santa is coming tonight! Don't forget the cookies!
{% elif states.sensor.holiday_christmas.state | int < 25 %} {% elif states.sensor.christmas_countdown.state | int < 31 %}
There are only {{states.sensor.holiday_christmas.state}} days until christmas. There are only {{states.sensor.holiday_christmas.state}} days until christmas.
{{ [ "All I want is a hippopatamus.",
"Hey Skylar, I know what you are getting. But I am not telling.",
"Don't forget to get something for your favorite smarthome.",
"It is starting to smell like Christmas."
] | random }}
{% else %} {% else %}
{% endif %} {% endif %}
{% endmacro %} {% endmacro %}
@ -530,11 +536,8 @@ script:
Skylar, Skylar,
{{ [ "It is time to get in the bath. ", {{ [ "It is time to get in the bath. ",
"You only have thirty minutes until bedtime. That means you should be heading for the bathtub.", "You only have thirty minutes until bedtime. That means you should be heading for the bathtub.",
"I cannot communicate with the bathtub, otherwise, I would have started the water for you already. So you will have to start the bath yourself. ", "I cannot comminicate with the bathtub, otherwise, I would have started the water for you already. So you will have to start the bath yourself. ",
"My sensors are detecting a strange smell. I am running diagnostics, but in the mean time why don't you start a bath.", "My sensors are detecting a strange smell. I am running diagnostics, but in the mean time why don't you start a bath.",
"It is time to start the pre bed routine.",
"It is bathtime.",
"Even Jedi have to take a bath."
] | random }} ] | random }}
If you go now there may be time for stories. Don't forget to brush your teeth. If you go now there may be time for stories. Don't forget to brush your teeth.
{% if is_state("sensor.weekday", "fri") %} {% if is_state("sensor.weekday", "fri") %}
@ -545,6 +548,7 @@ script:
{% endif %} {% endif %}
{% endmacro %} {% endmacro %}
{% macro school_today() %} {% macro school_today() %}
{% if states.calendar.skylar_school.attributes.offset_reached == True %} {% if states.calendar.skylar_school.attributes.offset_reached == True %}
Because you have school today! Because you have school today!
@ -552,16 +556,16 @@ script:
And guess what? It is early release! And guess what? It is early release!
{% endif %} {% endif %}
{% if states.calendar.skylar_school.attributes.description == "start_thanksgiving_break" %} {% if states.calendar.skylar_school.attributes.description == "start_thanksgiving_break" %}
Also, tomorrow is the first day of Thanksgiving Break! And One More Thing. Tomorrow is the first day of Thanksgiving Break.
{% endif %} {% endif %}
{% if states.calendar.skylar_school.attributes.description == "start_winter_break" %} {% if states.calendar.skylar_school.attributes.description == "start_winter_break" %}
Also, tomorrow is the first day of Winter Break! And One More Thing. Tomorrow is the first day of Winter Break.
{% endif %} {% endif %}
{% if states.calendar.skylar_school.attributes.description == "start_spring_break" %} {% if states.calendar.skylar_school.attributes.description == "start_spring_break" %}
Also, tomorrow is the first day of Spring Break! And One More Thing. Tomorrow is the first day of Spring Break.
{% endif %} {% endif %}
{% if states.calendar.skylar_school.attributes.description == "start_fall_break" %} {% if states.calendar.skylar_school.attributes.description == "start_fall_break" %}
Also, tomorrow is the first day of Fall Break! And One More Thing. Tomorrow is the first day of Fall Break.
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endmacro %} {% endmacro %}
@ -572,10 +576,10 @@ script:
You have {{ states.calendar.skylar_events.attributes.message }} today as well! You have {{ states.calendar.skylar_events.attributes.message }} today as well!
{% endif %} {% endif %}
{% if is_state("sensor.weekday", "mon") %} {% if is_state("sensor.weekday", "mon") %}
And you also have The Little Gym today. And you have The Little Gym today.
{% endif %} {% endif %}
{% if is_state("sensor.weekday", "wed") %} {% if is_state("sensor.weekday", "wed") %}
And you also have Game Time today. And you have Game Time today.
{% endif %} {% endif %}
{% endmacro %} {% endmacro %}
@ -583,13 +587,13 @@ script:
{% if is_state("sensor.clothing_forecast", "Freezing") %} {% if is_state("sensor.clothing_forecast", "Freezing") %}
It is going to be freezing today so I suggest wearing long pants, and a heavy coat. It is going to be freezing today so I suggest wearing long pants, and a heavy coat.
{% elif is_state("sensor.clothing_forecast","Cold") %} {% elif is_state("sensor.clothing_forecast","Cold") %}
It is going to be cold today so I suggest wearing long pants and a jacket. It is going to be cold today so I suggest wearing long pants and a light jacket.
{% elif is_state("sensor.clothing_forecast", "Chilly") %} {% elif is_state("sensor.clothing_forecast", "Chilly") %}
It is going to be chilly today so I suggest wearing at least long pants. It is going to be chilly today so I suggest wearing at least long pants.
{% elif is_state("sensor.clothing_forecast", "Nice") %} {% elif is_state("sensor.clothing_forecast", "Nice") %}
It is going to be It is going to be
{{ [ "nice outside", {{ [ "nice outside",
"pretty nice outside " "pretty nice outside ",
"a good day to be outside ", "a good day to be outside ",
"rather enjoyable outside ", "rather enjoyable outside ",
] | random }} ] | random }}
@ -605,7 +609,7 @@ script:
{% elif is_state("sensor.clothing_forecast", "Hot") %} {% elif is_state("sensor.clothing_forecast", "Hot") %}
It is going to be It is going to be
{{ [ "hot", {{ [ "hot",
"hotter than the sun " "hotter than the sun ",
"hotter than hot, but in a lot of bad ways ", "hotter than hot, but in a lot of bad ways ",
"hotter than the sun outside ", "hotter than the sun outside ",
"super hot ", "super hot ",
@ -619,7 +623,13 @@ script:
{% macro school_holiday() %} {% macro school_holiday() %}
{% if states.calendar.school_holiday.attributes.offset_reached == True %} {% if states.calendar.school_holiday.attributes.offset_reached == True %}
Oh, and if you did not know. There is no School today. And look at that. You do not have school today.
{{ [ "Guess today would be a good day to clean your room.",
"You could always do some chores.",
"Lets try to keep the TV off today.",
"Want to play a nice game of chess?",
"I hope you enjoy your day off. You deserve it."
] | random }}
{% endif %} {% endif %}
{% endmacro %} {% endmacro %}