Clean up lightning monitoring
This commit is contained in:
@ -1597,9 +1597,23 @@ script:
|
||||
lightning_warning:
|
||||
alias: 'Lightning Warning'
|
||||
sequence:
|
||||
- service: script.text_notify
|
||||
data:
|
||||
type: alert
|
||||
who: 'all'
|
||||
title: "Lightning Detected!"
|
||||
message: >-
|
||||
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
||||
"Lightning has been detected within 20 miles of the house. Nearest storm is {{ ltgdist }} miles away."
|
||||
tag: lightning-warning
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.lightning_warning
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.audible_notifications
|
||||
state: 'on'
|
||||
then:
|
||||
- service: scene.create
|
||||
data:
|
||||
scene_id: lightning_alert_restore
|
||||
@ -1635,18 +1649,6 @@ script:
|
||||
who: 'common'
|
||||
call_interuption: 1
|
||||
call_lightning_alert: 1
|
||||
- service: script.text_notify
|
||||
data:
|
||||
type: alert
|
||||
who: 'all'
|
||||
title: "Lightning Detected!"
|
||||
message: >-
|
||||
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
||||
"Lightning has been detected within 20 miles of the house. Nearest storm is {{ ltgdist }} miles away."
|
||||
tag: lightning-warning
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.lightning_warning
|
||||
- delay:
|
||||
seconds: 10
|
||||
- service: scene.turn_on
|
||||
|
Reference in New Issue
Block a user