Adding some variety to the postal announcements

This commit is contained in:
Jeffrey Stone 2020-03-17 22:47:55 -04:00
parent 06911d694a
commit 2894eeecc9
1 changed files with 15 additions and 3 deletions

View File

@ -52,9 +52,21 @@ automation:
data_template:
usps: >-
{%- if states.sensor.usps_mail.state | int == 1 -%}
USPS is delivering {{ states.sensor.usps_mail.state }} piece of mail today.
{{ [
"USPS is delivering",
"The postal service will be leaving",
"The nice lady in the mail truck is bringing us ",
"I have scanned the incoming mail, eliminated the junk, and determined there is"
] | random }}
{{ states.sensor.usps_mail.state }} piece of mail today.
{%- else -%}
USPS is delivering {{ states.sensor.usps_mail.state }} pieces of mail today.
{{ [
"USPS is delivering",
"The postal service will be leaving",
"The nice lady in the mail truck is bringing us ",
"I have scanned the incoming mail, eliminated the junk, and determined there are"
] | random }}
{{ states.sensor.usps_mail.state }} pieces of mail today.
{%- endif -%}
call_interuption: 1
- service: script.text_notify