Removed WWLLN...I'm not bitter...

This commit is contained in:
Jeffrey Stone 2020-05-28 14:57:02 -04:00
parent 837e2a9024
commit 05350be8e1
2 changed files with 60 additions and 56 deletions

View File

@ -28,9 +28,9 @@ input_boolean:
weather_alert_texts:
name: Weather Alert Texts
icon: mdi:telegram
lightning_warning:
name: Lightning Warning
icon: mdi:flash-alert
# lightning_warning:
# name: Lightning Warning
# icon: mdi:flash-alert
### You first need to find either your NWS Zone ID or County ID. Im not sure which is better but I used my Zone ID here.
### You can find your Zone ID by going to https://alerts.weather.gov/ 7, scroll down to your state and click on the “zone list” then look for the entry for your county.
@ -305,32 +305,27 @@ automation:
title: "Tornado Warning!"
message: "The National Weather Service Has issued a Tornado Warning for our area."
- alias: Lightning Detected
initial_state: 'on'
trigger:
- platform: geo_location
source: wwlln
zone: zone.lightning_warning
event: enter
action:
# - service: input_boolean.turn_on
# entity_id: input_boolean.lightning_warning
- service: script.text_notify
data_template:
who: "jeff"
title: "Lightning Detected!"
message: "Lightning has been detected within 50 miles of Anchorage House"
# - service: script.lightning_warning_audible
# - alias: Lightning Detected
# initial_state: 'on'
# trigger:
# - platform: state
# entity_id: binary_sensor.lightning_active
# to: 'on'
# action:
# - service: script.text_notify
# data_template:
# who: "jeff"
# title: "Lightning Detected!"
# message: "Lightning has been detected within 15 miles of Anchorage House"
# - service: script.lightning_warning_audible
# - alias: Lightning Warning Off
# initial_state: 'on'
# trigger:
# - platform: numeric_state
# entity_id: sensor.lightning_strike_count
# below: 1
# - platform: state
# entity_id: binary_sensor.lightning_active
# to: 'off'
# action:
# - service: input_boolean.turn_off
# entity_id: input_boolean.lightning_warning
# - service: script.text_notify
# data_template:
# who: "jeff"
@ -338,6 +333,16 @@ automation:
# message: "No more Lightning Strikes detected."
# - service: script.lightning_clear_audible
# - alias: 'lightning_update'
# initial_state: 'on'
# trigger:
# - platform: time_pattern
# minutes: '/5'
# action:
# - service: homeassistant.update_entity
# entity_id: sensor.lightning_strike_count
# - service: homeassistant.update_entity
# entity_id: binary_sensor.lightning_active
- alias: NWS Freeze Warning
initial_state: 'on'
@ -451,34 +456,34 @@ script:
media_content_id: http://192.168.7.40/audio/tornado_alarm.mp3
media_content_type: "music"
lighning_warning_audible:
sequence:
- condition: state
entity_id: binary_sensor.day
state: 'on'
- service: script.twitter_notify_image
data_template:
tweet: '{{ [ "Did you see that flash? I did. Letting everyone know there is lightning nearby.",
"When Lightning is near I notify the residents of Anchorage House to keep them safe.",
"If the residents of Anchorage House didnt hear the thunder I just gave them a heads up.",
"Everyone inside! If you are near Anchorage House that is. Lightning is near." ] | random }}'
image: >-
{{ [ "/config/www/tweet_images/lightning.jpg",
"/config/www/tweet_images/lightning-bolt.jpg"] | random }}
- service: script.ah_report
data:
call_interuption: 1
call_lightning_alert: 1
# lighning_warning_audible:
# sequence:
# - condition: state
# entity_id: binary_sensor.day
# state: 'on'
# - service: script.twitter_notify_image
# data_template:
# tweet: '{{ [ "Did you see that flash? I did. Letting everyone know there is lightning nearby.",
# "When Lightning is near I notify the residents of Anchorage House to keep them safe.",
# "If the residents of Anchorage House didnt hear the thunder I just gave them a heads up.",
# "Everyone inside! If you are near Anchorage House that is. Lightning is near." ] | random }}'
# image: >-
# {{ [ "/config/www/tweet_images/lightning.jpg",
# "/config/www/tweet_images/lightning-bolt.jpg"] | random }}
# - service: script.ah_report
# data:
# call_interuption: 1
# call_lightning_alert: 1
lighning_clear_audible:
sequence:
- condition: state
entity_id: binary_sensor.day
state: 'on'
- service: script.ah_report
data:
call_interuption: 1
call_lightning_clear: 1
# lighning_clear_audible:
# sequence:
# - condition: state
# entity_id: binary_sensor.day
# state: 'on'
# - service: script.ah_report
# data:
# call_interuption: 1
# call_lightning_clear: 1
refresh_weather_alert_sensors:
sequence:

View File

@ -191,8 +191,7 @@
friendly_name: "Current Inside Humidity"
unit_of_measurement: '%'
value_template: "{{ states.climate.home.attributes.current_humidity }}"
lightning_strike_count:
friendly_name: 'Lightning Strike Count'
entity_id: []
value_template: >-
{{ states.geo_location | list | count }}
# lightning_strike_count:
# friendly_name: 'Lightning Strike Count'
# value_template: >
# {{ states.geo_location|selectattr('attributes.source','eq','wwlln') and states.geo_location|selectattr('state','lessthan','15')|list|count }}