Added in more variables for lightning #392

This commit is contained in:
ccostan 2020-07-28 16:03:52 -04:00
parent e11466f45b
commit dfeb8c49fb
1 changed files with 4 additions and 3 deletions

View File

@ -24,13 +24,13 @@ automation:
- service: script.notify_engine - service: script.notify_engine
data_template: data_template:
title: 'Lightning Warning!' title: 'Lightning Warning!'
value1: 'Lightning has been detected within 2.5 Miles of our home. Be careful if outdoors.' value1: "Lightning has been detected within {{(states('sensor.blitzortung_lightning_distance') | int / 1.69) | round (1, 'floor')}} Miles of our home. Be careful if outdoors."
who: 'family' who: 'family'
apns_id: 'Alert' apns_id: 'Alert'
- service: script.speech_engine - service: script.speech_engine
data_template: data_template:
value1: 'Lightning has been detected within 2.5 Miles of our home. Please make sure everyone is inside the house.' value1: "Lightning has been detected within {{(states('sensor.blitzortung_lightning_distance') | int / 1.69) | round (1, 'floor')}} Miles of our home. Please make sure everyone is inside the house."
call_window_check: 1 call_window_check: 1
call_garage_check: 1 call_garage_check: 1
@ -38,7 +38,7 @@ automation:
data_template: data_template:
tweet: > tweet: >
{{ [ {{ [
"Lightning has been detected within 2.5 Miles of our home.", "{{ states('sensor.blitzortung_lightning_counter') }} lightning strike(s) have been detected within {{(states('sensor.blitzortung_lightning_distance') | int / 1.69) | round (1, 'floor')}} Miles of our home.",
"{{ states('sensor.blitzortung_lightning_counter') }} lightning strike(s) have been recorded by the house.", "{{ states('sensor.blitzortung_lightning_counter') }} lightning strike(s) have been recorded by the house.",
"Yikes! The lightning strike was way too close. Time to get everyone inside." "Yikes! The lightning strike was way too close. Time to get everyone inside."
] | random + ] | random +
@ -46,6 +46,7 @@ automation:
" #LightningCapital", " #LightningCapital",
" (https://github.com/CCOSTAN/Home-AssistantConfig/issues/392)", " (https://github.com/CCOSTAN/Home-AssistantConfig/issues/392)",
" #Bot ", " #Bot ",
" #Florida ",
" " " "
] | random }} ] | random }}
image: >- image: >-