From 05350be8e134a602a9805067ed3db677a9c5f198 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 28 May 2020 14:57:02 -0400 Subject: [PATCH] Removed WWLLN...I'm not bitter... --- config/packages/weather_alerts_nws.yaml | 107 +++++++++++++----------- config/sensors/weather.yaml | 9 +- 2 files changed, 60 insertions(+), 56 deletions(-) diff --git a/config/packages/weather_alerts_nws.yaml b/config/packages/weather_alerts_nws.yaml index fbbb7e3..a0e77f7 100755 --- a/config/packages/weather_alerts_nws.yaml +++ b/config/packages/weather_alerts_nws.yaml @@ -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. I’m 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: diff --git a/config/sensors/weather.yaml b/config/sensors/weather.yaml index 02bff0f..9407f49 100755 --- a/config/sensors/weather.yaml +++ b/config/sensors/weather.yaml @@ -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 }} \ No newline at end of file + # 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 }} \ No newline at end of file