mirror of
https://github.com/thejeffreystone/home-assistant-configuration.git
synced 2025-08-28 08:50:34 +00:00
Coninuing with the major audible notifications overhual of 2020
This commit is contained in:
@@ -1,15 +1,47 @@
|
||||
>
|
||||
{# Event Report #}
|
||||
{%- macro getReport() -%}
|
||||
<p>
|
||||
{% if is_state('calendar.holidays_in_united_states', 'on') %}
|
||||
Today is {{states.calendar.holidays_in_united_states.attributes.message}}.
|
||||
{% endif %}
|
||||
{% if is_state('calendar.anchorage_holidays', 'on') %}
|
||||
Today is {{states.calendar.anchorage_holidays.attributes.message}}.
|
||||
{% endif %}
|
||||
{% if states.calendar.birthdays.state == 'on' %}
|
||||
Today is {{ states.calendar.birthdays.attributes.message }}! So Happy Birthday! The confetti cannon is not working otherwise I would shower you in paper.
|
||||
{% endif %}
|
||||
{%- set event=states.calendar.national_holidays.attributes.message %}
|
||||
{% if 'Day' in event and 'National' in event%}
|
||||
{{ [
|
||||
'And a very special Happy ',
|
||||
'It is also ',
|
||||
'Today is also known as ',
|
||||
'Oh <emphasis>Look</emphasis>. Today is ',
|
||||
'Want to know a fact? Today is ',
|
||||
'Everyday can be a holiday. So today is '
|
||||
]|random }}
|
||||
{{states.calendar.national_holidays.attributes.message | replace("&"," and ") }}.
|
||||
{%- endif -%}
|
||||
</p>
|
||||
<p>
|
||||
{% if states.sensor.birthday_skylar.state | int == 1 %}
|
||||
Tomorrow is Skylar's Birthday.
|
||||
{% elif states.sensor.birthday_skylar.state | int > 1 and states.sensor.birthday_skylar.state | int < 15 %}
|
||||
Skylar's Birthday is in {{ states.sensor.birthday_skylar.state }} days!
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% if states.sensor.birthday_jeff.state | int == 1 %}
|
||||
Tomorrow is Jeff's Birthday.
|
||||
{% elif states.sensor.birthday_jeff.state | int > 1 and states.sensor.birthday_jeff.state | int < 15 %}
|
||||
Jeff's Birthday is in {{ states.sensor.birthday_jeff.state }} days!
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% if states.sensor.birthday_kat.state | int == 1 %}
|
||||
Tomorrow is Katherine's Birthday.
|
||||
{% elif states.sensor.birthday_kat.state | int > 1 and states.sensor.birthday_kat.state | int < 15 %}
|
||||
Katherine's Birthday is in {{ states.sensor.birthday_kat.state }} days!
|
||||
{% else %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
@@ -19,7 +51,7 @@
|
||||
'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 <emphasis>dare</emphasis> you to ask me to open them. '
|
||||
] | random }}
|
||||
{% elif states.sensor.halloween_countdown.state | int < 30 %}
|
||||
{% elif states.sensor.halloween_countdown.state | int < 30 and states.sensor.halloween_countdown.state | int > 1 %}
|
||||
There are only {{states.sensor.halloween_countdown.state}} days
|
||||
{{ [ 'until Halloween.',
|
||||
'until Halloween. It might not be enough time. ',
|
||||
@@ -31,7 +63,7 @@
|
||||
{% endif %}
|
||||
{% if states.sensor.christmas_countdown.state | int == 1 %}
|
||||
Tomorrow is Christmas. <break time="1s"/> It is practically here! <break time="1s"/> Santa is coming tonight! Do not forget the cookies!
|
||||
{% elif states.sensor.christmas_countdown.state | int < 31 %}
|
||||
{% elif states.sensor.christmas_countdown.state | int < 31 and states.sensor.christmas_countdown.state | int > 1 %}
|
||||
There are only {{states.sensor.christmas_countdown.state}} days until christmas.
|
||||
{{ [ 'All I want for Christmas, is a hippopotamus.',
|
||||
'Hey Skylar, I know what you are getting for Christmas. But <emphasis>I am</emphasis> not telling.',
|
||||
|
@@ -39,7 +39,7 @@
|
||||
{{states.sensor.today_is.state }}.
|
||||
</p>
|
||||
<p>
|
||||
It is currently {{states.weather.home_2.state}} and {{states.sensor.back_porch.state|round}} degrees in Grayson.
|
||||
It is currently {{states.weather.home_2.state}} and {{states.sensor.back_porch_temperature.state|round}} degrees in Grayson.
|
||||
</p>
|
||||
<p>
|
||||
{% if states.sensor.nws_alerts.state | int > 0 %}
|
||||
@@ -99,7 +99,7 @@
|
||||
And do not forget. Today is also {{states.calendar.anchorage_holidays.attributes.message}}.
|
||||
{% endif %}
|
||||
{% if states.calendar.birthdays.state == 'on' %}
|
||||
Today is {{ states.calendar.birthdays.attributes.message }}! So Happy Birthday! The confetti cannon is not working otherwise I would shower you in paper.
|
||||
Today is {{ states.calendar.birthdays.attributes.message }}! So Happy Birthday! The confetti cannon is not working otherwise I would shower you in paper garbage that someone else would have to pick up.
|
||||
{% endif %}
|
||||
{%- set event=states.calendar.national_holidays.attributes.message %}
|
||||
{% if 'Day' in event and 'National' in event%}
|
||||
@@ -112,22 +112,6 @@
|
||||
'Everyday can be a holiday. So today is '
|
||||
]|random }}
|
||||
{{states.calendar.national_holidays.attributes.message | replace("&"," and ") }}.
|
||||
{{ [
|
||||
'We should celebrate.',
|
||||
'I will leave the party planning up to <emphasis>you</emphasis>.',
|
||||
'I bet <emphasis>you</emphasis> are glad I told you.',
|
||||
'Wait. <emphasis>Really.</emphasis> That cannot be a <emphasis>Real</emphasis> holiday.',
|
||||
'Wait. <emphasis>That</emphasis> is a <emphasis>Real</emphasis> holiday?',
|
||||
'Umm. Okay. You <emphasis>cannot</emphasis> make this stuff up.',
|
||||
'But, <emphasis>that</emphasis> just sounds silly.',
|
||||
'You did not know did <emphasis>you</emphasis>? But, <emphasis>now </emphasis> you do.'
|
||||
]|random }}
|
||||
{{ [
|
||||
'Anyway. ',
|
||||
'Moving On. ',
|
||||
'Back to the morning announcements. ',
|
||||
'Right. Well. '
|
||||
]|random }}
|
||||
{%- endif -%}
|
||||
</p>
|
||||
<p>
|
||||
|
@@ -39,7 +39,7 @@
|
||||
{{states.sensor.today_is.state }}.
|
||||
</p>
|
||||
<p>
|
||||
It is currently {{states.weather.home_2.state}} and {{states.sensor.back_porch.state|round}} degrees in Grayson.
|
||||
It is currently {{states.weather.home_2.state}} and {{states.sensor.back_porch_temperature.state|round}} degrees in Grayson.
|
||||
</p>
|
||||
<p>
|
||||
{% if is_state('sensor.clothing_forecast', 'Freezing') %}
|
||||
|
@@ -1,157 +1,62 @@
|
||||
>
|
||||
{# Nightky Report #}
|
||||
{# Nightly Report #}
|
||||
{%- macro getReport() -%}
|
||||
<p>
|
||||
{% if now().strftime('%H')|int < 12 and now().strftime('%H')|int > 6 %}
|
||||
Good morning.
|
||||
{% elif now().strftime('%H')|int >= 12 and now().strftime('%H')|int < 17 %}
|
||||
Good afternoon.
|
||||
{% else %}
|
||||
Good evening.
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if now().strftime('%H')|int < 12 %}
|
||||
{% if now().strftime('%M')|int == 0 %}
|
||||
It is {{ now().strftime('%H')|int }} AM.
|
||||
{% else %}
|
||||
It is {{ now().strftime('%H')|int }} {{ now().strftime('%M')|int }} AM.
|
||||
{% endif %}
|
||||
|
||||
{% elif now().strftime('%H')|int > 12 %}
|
||||
{% if now().strftime('%M')|int == 0 %}
|
||||
It is {{ now().strftime('%H')|int }} PM.
|
||||
{% else %}
|
||||
It is {{ now().strftime('%H')|int }} {{ now().strftime('%M')|int }} PM.
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{{ [
|
||||
'The sun is officially down. Exterior Cameras are now motion activated.',
|
||||
'The sun has been ushered off the stage. I have armed the perimiter cameras.',
|
||||
'You are running out of daylight. Time to wrap up any outside chores.',
|
||||
'Switching Anchorage House to night mode! ',
|
||||
'The outside world has switched to dark mode.',
|
||||
'It is a little past Sunset. Time to turn on the outside lights. I am on it.',
|
||||
'I will switch on the outside lights. It is getting dark outside.',
|
||||
'Time to turn on the front lights. I will take care of it.',
|
||||
'If you have not looked outside lately, the light of the day is almost gone.'
|
||||
]|random }}
|
||||
</p>
|
||||
<p>
|
||||
{% if is_state('binary_sensor.garage_door', 'on') %}
|
||||
{{ [ 'The garage door is open. ',
|
||||
'The pod bay doors are open. ',
|
||||
'Someone forgot to close the garage.'
|
||||
] | random }}
|
||||
{% elif is_state('binary_sensor.side_door', 'on') %}
|
||||
{{ [ 'The side door is ajar. ',
|
||||
'The side door is open. ',
|
||||
'Someone forgot to close the side door.'
|
||||
] | random }}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if states.sensor.nws_alerts.state | int > 0 %}
|
||||
There are currently {{states.sensor.nws_alerts.state }} active weather alerts for our area.
|
||||
The National Weather Service Has issued,
|
||||
{% if states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] is defined %}
|
||||
a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] }}.
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] is defined %}
|
||||
a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] }}.
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] is defined %}
|
||||
a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] }}.
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] is defined %}
|
||||
a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] }}.
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] is defined %}
|
||||
a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] }}.
|
||||
{% else %}
|
||||
a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[0] }}.
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{{ [
|
||||
'Tonight we can expect,',
|
||||
'Expect weather tonight to be,'
|
||||
]|random }}
|
||||
{{ states.sensor.nws_overnight_forecast.state }}
|
||||
</p>
|
||||
<p>
|
||||
{% if is_state('input_boolean.freeze_warning','on') %}
|
||||
{{ [ 'The temperature is expected to be near or below freezing. <emphasis>Someone</emphasis> might want to bring the lemon tree in. ',
|
||||
'It appears that it will be cold tonight. Like, the turn water solid <emphasis>kind</emphasis> of cold. Think of the poor plants.',
|
||||
'I suggest bringing in the plants other wise, the temperature might kill them. And that will be on <emphasis>you</emphasis>.',
|
||||
'I would say winter is coming. But, based on the weather forecast <emphasis>it</emphasis> appears to be here.',
|
||||
'It will be freezing cold tonight. I would bring in the plants but I lack legs. And Arms. So I am forced to rely on you. Do not let me down.'
|
||||
] | random }}
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
{% if is_state('sensor.today_is', 'Tuesday') %}
|
||||
{% if now().strftime('%H')|int > 17 %}
|
||||
{{ [ 'Do not forget to bring in the trash cans. ',
|
||||
'The trash cans will feel lonely if you leave them out all night. ',
|
||||
'The <say-as interpret-as="characters">HOA</say-as> will get mad if you leave those trash cans out on the street.'
|
||||
] | random }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if states.sensor.halloween_countdown.state | int == 1 %}
|
||||
Tomorrow is Halloween. I hope you have picked out a costume.
|
||||
{{ [ 'I will be going as a dumb home. ',
|
||||
'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 <emphasis>dare</emphasis> you to ask me to open them. '
|
||||
] | random }}
|
||||
Tomorrow is Halloween. I hope you have picked out a costume.
|
||||
{{ [ 'I will be going as a dumb home. ',
|
||||
'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 <emphasis>dare</emphasis> you to ask me to open them. '
|
||||
] | random }}
|
||||
{% elif states.sensor.halloween_countdown.state | int < 30 %}
|
||||
There are only {{states.sensor.halloween_countdown.state}} days
|
||||
{{ [ 'until Halloween.',
|
||||
'until Halloween. It might not be enough time. ',
|
||||
'and counting until the best holiday ever.',
|
||||
'until you need a costume.'
|
||||
] | random }}
|
||||
|
||||
There are only {{states.sensor.halloween_countdown.state}} days
|
||||
{{ [ 'until Halloween.',
|
||||
'until Halloween. It might not be enough time. ',
|
||||
'and counting until the best holiday ever.',
|
||||
'until you need a costume.'
|
||||
] | random }}
|
||||
|
||||
{% else %}
|
||||
{% endif %}
|
||||
|
||||
{% if states.sensor.christmas_countdown.state | int == 1 %}
|
||||
Tomorrow is Christmas. <break time="1s"/> It is practically here! <break time="1s"/> Santa is coming tonight! Do not forget the cookies!
|
||||
Tomorrow is Christmas. <break time="1s"/> It is practically here! <break time="1s"/> Santa is coming tonight! Do not forget the cookies!
|
||||
{% elif states.sensor.christmas_countdown.state | int < 31 %}
|
||||
There are only {{states.sensor.christmas_countdown.state}} days until christmas.
|
||||
{{ [ 'All I want for Christmas, is a hippopotamus.',
|
||||
'Hey Skylar, I know what you are getting for Christmas. But <emphasis>I am</emphasis> not telling.',
|
||||
'Do not forget to put something under the tree for <emphasis>your</emphasis> favorite smarthome.',
|
||||
'It is starting to smell a lot like Christmas. Or it could be the christmas tree is on fire.',
|
||||
'I do not want to be a smarthome. I want to be a dentist.',
|
||||
'Do not eat all the cookies. '
|
||||
] | random }}
|
||||
There are only {{states.sensor.christmas_countdown.state}} days until christmas.
|
||||
{{ [ 'All I want for Christmas, is a hippopotamus.',
|
||||
'Hey Skylar, I know what you are getting for Christmas. But <emphasis>I am</emphasis> not telling.',
|
||||
'Do not forget to put something under the tree for <emphasis>your</emphasis> favorite smarthome.',
|
||||
'It is starting to smell a lot like Christmas. Or it could be the christmas tree is on fire.',
|
||||
'I do not want to be a smarthome. I want to be a dentist.',
|
||||
'Do not eat all the cookies. '
|
||||
] | random }}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
{% if states.sensor.trip_disney.state | int == 120 %}
|
||||
There are only one hundred and twenty days until the next Disney Trip.
|
||||
There are only one hundred and twenty days until the next Disney Trip.
|
||||
{% endif %}
|
||||
{% if states.sensor.trip_disney.state | int == 60 %}
|
||||
There are only on sixty days until the next Disney Trip.
|
||||
There are only on sixty days until the next Disney Trip.
|
||||
{% endif %}
|
||||
{% if states.sensor.trip_disney.state | int < 32 %}
|
||||
{% if states.sensor.trip_disney.state | int > 1 %}
|
||||
There are {{ states.sensor.trip_disney.state }} days until the next Disney Trip!
|
||||
{% else %}
|
||||
There is {{ states.sensor.trip_disney.state }} day until the next Disney Trip!
|
||||
{% endif %}
|
||||
{% if states.sensor.trip_disney.state | int > 1 %}
|
||||
There are {{ states.sensor.trip_disney.state }} days until the next Disney Trip!
|
||||
{% else %}
|
||||
There is {{ states.sensor.trip_disney.state }} day until the next Disney Trip!
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if states.sensor.anniversary_our_wedding.state | int == 1 %}
|
||||
Tomorrow is Jeff and Katherine's Wedding Anniversary.
|
||||
Tomorrow is Jeff and Katherine's Wedding Anniversary.
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if states.sensor.trip_disney.state | int == 1 %}
|
||||
Oh, and there is just one more sleep until the next Disney Trip!
|
||||
{% endif %}
|
||||
</p>
|
||||
{%- endmacro -%}
|
||||
|
||||
|
||||
|
@@ -7,34 +7,35 @@
|
||||
'Sentry Mode is enabled.',
|
||||
'Sentry mode is currently active.',
|
||||
'Barn Door Protocol is currently in effect.',
|
||||
'My security system is currently armed.'
|
||||
'My security system is currently armed.',
|
||||
'Anchorage House is in lockdown mode. '
|
||||
] | random}}
|
||||
{% else %}
|
||||
{{ [
|
||||
'Sentry Mode is disabled.',
|
||||
'Sentry mode is currently inactive.',
|
||||
'My security system is currently disarmed.'
|
||||
'My security system is currently disarmed.',
|
||||
'Anchorage House is currently in standby. '
|
||||
] | random}}
|
||||
{% endif %}
|
||||
{%- if states.group.external_doors.state == 'off' %}
|
||||
All external doors are secured.
|
||||
All external doors are currently secured.
|
||||
{% else %}
|
||||
The following doors are open,
|
||||
{%- if states.binary_sensor.front_door.state == 'on' %}
|
||||
Front Door.
|
||||
{% endif %}
|
||||
{%- if states.binary_sensor.back_door.state == 'on' %}
|
||||
Back Door.
|
||||
{% endif %}
|
||||
{%- if states.binary_sensor.laundry_room_door.state == 'on' %}
|
||||
Laundry Room Door.
|
||||
{% endif %}
|
||||
{%- if states.binary_sensor.garage_door.state == 'on' %}
|
||||
Garage Door.
|
||||
{% endif %}
|
||||
{%- if states.binary_sensor.side_door.state == 'on' %}
|
||||
Side Door.
|
||||
{% set open_doors = expand('group.external_doors')| selectattr('state', 'eq', 'on') | map(attribute='name')|join(' and ') %}
|
||||
{% set open_door_count = expand('group.external_doors') | selectattr('state', 'eq', 'on') | list | count %}
|
||||
{% if open_door_count == 1 %}
|
||||
{% set is_are = ' is ' %}
|
||||
{% else %}
|
||||
{% set is_are = ' are ' %}
|
||||
{% endif %}
|
||||
{%- macro announcement(open_doors, is_are) -%}
|
||||
{{ [
|
||||
open_doors ~ is_are + " standing open.",
|
||||
open_doors ~ is_are + " not secured.",
|
||||
open_doors ~ is_are + " open."
|
||||
] | random }}
|
||||
{%- endmacro -%}
|
||||
{{announcement(open_doors)}}
|
||||
{% endif %}
|
||||
</p>
|
||||
{%- endmacro -%}
|
||||
|
@@ -1,6 +1,57 @@
|
||||
>
|
||||
{# Skylar Nightly Report #}
|
||||
{%- macro getReport() -%}
|
||||
|
||||
<p>
|
||||
{% if states.sensor.halloween_countdown.state | int == 1 %}
|
||||
Tomorrow is Halloween. I hope you have picked out a costume.
|
||||
{{ [ 'I will be going as a dumb home. ',
|
||||
'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 <emphasis>dare</emphasis> you to ask me to open them. '
|
||||
] | random }}
|
||||
{% elif states.sensor.halloween_countdown.state | int < 30 %}
|
||||
There are only {{states.sensor.halloween_countdown.state}} days
|
||||
{{ [ 'until Halloween.',
|
||||
'until Halloween. It might not be enough time. ',
|
||||
'and counting until the best holiday ever.',
|
||||
'until you need a costume.'
|
||||
] | random }}
|
||||
|
||||
{% else %}
|
||||
{% endif %}
|
||||
|
||||
{% if states.sensor.christmas_countdown.state | int == 1 %}
|
||||
Tomorrow is Christmas. <break time="1s"/> It is practically here! <break time="1s"/> Santa is coming tonight! Do not forget the cookies!
|
||||
{% elif states.sensor.christmas_countdown.state | int < 31 %}
|
||||
There are only {{states.sensor.christmas_countdown.state}} days until christmas.
|
||||
{{ [ 'All I want for Christmas, is a hippopotamus.',
|
||||
'Hey Skylar, I know what you are getting for Christmas. But <emphasis>I am</emphasis> not telling.',
|
||||
'Do not forget to put something under the tree for <emphasis>your</emphasis> favorite smarthome.',
|
||||
'It is starting to smell a lot like Christmas. Or it could be the christmas tree is on fire.',
|
||||
'I do not want to be a smarthome. I want to be a dentist.',
|
||||
'Do not eat all the cookies. '
|
||||
] | random }}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if states.sensor.trip_disney.state | int == 120 %}
|
||||
There are only one hundred and twenty days until the next Disney Trip.
|
||||
{% endif %}
|
||||
{% if states.sensor.trip_disney.state | int == 60 %}
|
||||
There are only on sixty days until the next Disney Trip.
|
||||
{% endif %}
|
||||
{% if states.sensor.trip_disney.state | int < 32 %}
|
||||
{% if states.sensor.trip_disney.state | int > 1 %}
|
||||
There are {{ states.sensor.trip_disney.state }} days until the next Disney Trip!
|
||||
{% else %}
|
||||
There is {{ states.sensor.trip_disney.state }} day until the next Disney Trip!
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if states.sensor.anniversary_our_wedding.state | int == 1 %}
|
||||
Tomorrow is Jeff and Katherine's Wedding Anniversary.
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
Skyler,
|
||||
{{ [ 'It is time to get in the bath. ',
|
||||
|
174
config/templates/speech/sundown_briefing.yaml
Executable file
174
config/templates/speech/sundown_briefing.yaml
Executable file
@@ -0,0 +1,174 @@
|
||||
>
|
||||
{# Nightky Report #}
|
||||
{%- macro getReport() -%}
|
||||
<p>
|
||||
{% if now().strftime('%H')|int < 12 and now().strftime('%H')|int > 6 %}
|
||||
Good morning.
|
||||
{% elif now().strftime('%H')|int >= 12 and now().strftime('%H')|int < 17 %}
|
||||
Good afternoon.
|
||||
{% else %}
|
||||
Good evening.
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if now().strftime('%H')|int < 12 %}
|
||||
{% if now().strftime('%M')|int == 0 %}
|
||||
It is {{ now().strftime('%H')|int }} AM.
|
||||
{% else %}
|
||||
It is {{ now().strftime('%H')|int }} {{ now().strftime('%M')|int }} AM.
|
||||
{% endif %}
|
||||
|
||||
{% elif now().strftime('%H')|int > 12 %}
|
||||
{% if now().strftime('%M')|int == 0 %}
|
||||
It is {{ now().strftime('%H')|int }} PM.
|
||||
{% else %}
|
||||
It is {{ now().strftime('%H')|int }} {{ now().strftime('%M')|int }} PM.
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{{ [
|
||||
'The sun is officially down. Exterior Cameras are now motion activated.',
|
||||
'The sun has been ushered off the stage. I have armed the perimiter cameras.',
|
||||
'You are running out of daylight. Time to wrap up any outside chores.',
|
||||
'Switching Anchorage House to night mode! ',
|
||||
'The outside world has switched to dark mode.',
|
||||
'It is a little past Sunset. Time to turn on the outside lights. I am on it.',
|
||||
'I will switch on the outside lights. It is getting dark outside.',
|
||||
'Time to turn on the front lights. I will take care of it.',
|
||||
'If you have not looked outside lately, the light of the day is almost gone.'
|
||||
]|random }}
|
||||
</p>
|
||||
<p>
|
||||
{% if is_state('binary_sensor.garage_door', 'on') %}
|
||||
{{ [ 'The garage door is open. ',
|
||||
'The pod bay doors are open. ',
|
||||
'Someone forgot to close the garage.'
|
||||
] | random }}
|
||||
{% elif is_state('binary_sensor.side_door', 'on') %}
|
||||
{{ [ 'The side door is ajar. ',
|
||||
'The side door is open. ',
|
||||
'Someone forgot to close the side door.'
|
||||
] | random }}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if states.sensor.nws_alerts.state | int > 0 %}
|
||||
There are currently {{states.sensor.nws_alerts.state }} active weather alerts for our area.
|
||||
The National Weather Service Has issued,
|
||||
{% if states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] is defined %}
|
||||
a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] }}.
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] is defined %}
|
||||
a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] }}.
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] is defined %}
|
||||
a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] }}.
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] is defined %}
|
||||
a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] }}.
|
||||
{% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] is defined %}
|
||||
a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] }}.
|
||||
{% else %}
|
||||
a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[0] }}.
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{{ [
|
||||
'Tonight we can expect,',
|
||||
'Expect weather tonight to be,'
|
||||
]|random }}
|
||||
{{ states.sensor.nws_overnight_forecast.state }}
|
||||
</p>
|
||||
<p>
|
||||
{% if is_state('input_boolean.freeze_warning','on') %}
|
||||
{{ [ 'The temperature is expected to be near or below freezing. <emphasis>Someone</emphasis> might want to bring the lemon tree in. ',
|
||||
'It appears that it will be cold tonight. Like, the turn water solid <emphasis>kind</emphasis> of cold. Think of the poor plants.',
|
||||
'I suggest bringing in the plants other wise, the temperature might kill them. And that will be on <emphasis>you</emphasis>.',
|
||||
'I would say winter is coming. But, based on the weather forecast <emphasis>it</emphasis> appears to be here.',
|
||||
'It will be freezing cold tonight. I would bring in the plants but I lack legs. And Arms. So I am forced to rely on you. Do not let me down.'
|
||||
] | random }}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% if is_state('sensor.today_is', 'Tuesday') %}
|
||||
{% if now().strftime('%H')|int > 17 %}
|
||||
{{ [ 'Do not forget to bring in the trash cans. ',
|
||||
'The trash cans will feel lonely if you leave them out all night. ',
|
||||
'The <say-as interpret-as="characters">HOA</say-as> will get mad if you leave those trash cans out on the street.'
|
||||
] | random }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if states.sensor.halloween_countdown.state | int == 1 %}
|
||||
Tomorrow is Halloween. I hope you have picked out a costume.
|
||||
{{ [ 'I will be going as a dumb home. ',
|
||||
'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 <emphasis>dare</emphasis> you to ask me to open them. '
|
||||
] | random }}
|
||||
{% elif states.sensor.halloween_countdown.state | int < 30 %}
|
||||
There are only {{states.sensor.halloween_countdown.state}} days
|
||||
{{ [ 'until Halloween.',
|
||||
'until Halloween. It might not be enough time. ',
|
||||
'and counting until the best holiday ever.',
|
||||
'until you need a costume.'
|
||||
] | random }}
|
||||
|
||||
{% else %}
|
||||
{% endif %}
|
||||
|
||||
{% if states.sensor.christmas_countdown.state | int == 1 %}
|
||||
Tomorrow is Christmas. <break time="1s"/> It is practically here! <break time="1s"/> Santa is coming tonight! Do not forget the cookies!
|
||||
{% elif states.sensor.christmas_countdown.state | int < 31 %}
|
||||
There are only {{states.sensor.christmas_countdown.state}} days until christmas.
|
||||
{{ [ 'All I want for Christmas, is a hippopotamus.',
|
||||
'Hey Skylar, I know what you are getting for Christmas. But <emphasis>I am</emphasis> not telling.',
|
||||
'Do not forget to put something under the tree for <emphasis>your</emphasis> favorite smarthome.',
|
||||
'It is starting to smell a lot like Christmas. Or it could be the christmas tree is on fire.',
|
||||
'I do not want to be a smarthome. I want to be a dentist.',
|
||||
'Do not eat all the cookies. '
|
||||
] | random }}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if states.sensor.trip_disney.state | int == 120 %}
|
||||
There are only one hundred and twenty days until the next Disney Trip.
|
||||
{% endif %}
|
||||
{% if states.sensor.trip_disney.state | int == 60 %}
|
||||
There are only on sixty days until the next Disney Trip.
|
||||
{% endif %}
|
||||
{% if states.sensor.trip_disney.state | int < 32 %}
|
||||
{% if states.sensor.trip_disney.state | int > 1 %}
|
||||
There are {{ states.sensor.trip_disney.state }} days until the next Disney Trip!
|
||||
{% else %}
|
||||
There is {{ states.sensor.trip_disney.state }} day until the next Disney Trip!
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if states.sensor.anniversary_our_wedding.state | int == 1 %}
|
||||
Tomorrow is Jeff and Katherine's Wedding Anniversary.
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if states.sensor.trip_disney.state | int == 1 %}
|
||||
Oh, and there is just one more sleep until the next Disney Trip!
|
||||
{% endif %}
|
||||
</p>
|
||||
{%- 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() -%}
|
||||
{{ getReport() }}
|
||||
{%- endmacro -%}
|
||||
|
||||
{# Call the macro #}
|
||||
{{- cleanup(mother_of_all_macros()) -}}
|
Reference in New Issue
Block a user