From 2894eeecc9cf163e483dce52c09763ba8d212471 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Tue, 17 Mar 2020 22:47:55 -0400 Subject: [PATCH] Adding some variety to the postal announcements --- config/packages/usps.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/config/packages/usps.yaml b/config/packages/usps.yaml index 8667e52..7dbcbdd 100755 --- a/config/packages/usps.yaml +++ b/config/packages/usps.yaml @@ -51,10 +51,22 @@ automation: - service: script.ah_report data_template: usps: >- - {%- if states.sensor.usps_mail.state | int == 1 -%} - USPS is delivering {{ states.sensor.usps_mail.state }} piece of mail today. + {%- if states.sensor.usps_mail.state | int == 1 -%} + {{ [ + "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