From 94d17e522df2c6f07fd0c83bab744e9340f46180 Mon Sep 17 00:00:00 2001 From: finity69x2 <32221243+finity69x2@users.noreply.github.com> Date: Fri, 3 Mar 2023 14:58:17 -0500 Subject: [PATCH] Delete nws_alerts_custom_package.yaml --- packages/nws_alerts_custom_package.yaml | 329 ------------------------ 1 file changed, 329 deletions(-) delete mode 100644 packages/nws_alerts_custom_package.yaml diff --git a/packages/nws_alerts_custom_package.yaml b/packages/nws_alerts_custom_package.yaml deleted file mode 100644 index 0bee528..0000000 --- a/packages/nws_alerts_custom_package.yaml +++ /dev/null @@ -1,329 +0,0 @@ -################################################################################# -# -# This is the package for NWS ALERTS USING THE CUSTOM INTEGRATION -# -################################################################################# - -## For testing the API - -# https://api.weather.gov/alerts/active/count - -# https://api.weather.gov/alerts/active?zone=INZ009,INC033 - -######################## SENSOR ############################################### - -## the NWS Sensor can now be installed using HACS. If you aren't using HACS you can uncomment the nws_alerts sensor here and configure it manually. - -# sensor: - # - platform: nws_alerts - # zone_id: 'INZ009,INC033' - # name: nws alerts yaml - -######################## BINARY SENSOR ######################################### - -binary_sensor: - - platform: template - sensors: - nws_alerts_are_active: - friendly_name: NWS Alerts Are Active - #entity_id: sensor.nws_alerts - value_template: > - {{ states('sensor.nws_alerts') | int(0) > 0 }} - icon_template: >- - {% if states('sensor.nws_alerts') | int(0) > 0 %} - mdi:weather-lightning - {% else %} - mdi:weather-sunny - {% endif %} - -######################## INPUT BOOLEAN ######################################### - -input_boolean: - nws_multi_alert: - name: NWS Multiple Alerts At Once - -######################## AUTOMATION ########################################### - -automation: - - alias: 'NWS Check for Multi Alerts' - initial_state: true - trigger: - - platform: state - entity_id: sensor.nws_alerts - condition: - - "{{ states('sensor.nws_alerts') | int > 0 }}" - - '{{ trigger.to_state.state|int > trigger.from_state.state|int }}' - action: - - choose: - - conditions: - - '{{ (trigger.to_state.state | int - trigger.from_state.state|int) > 1 }}' - sequence: - - service: input_boolean.turn_on - entity_id: input_boolean.nws_multi_alert - - delay: - seconds: 30 - - service: input_boolean.turn_on - entity_id: input_boolean.nws_multi_alert - - conditions: - - '{{ (trigger.to_state.state | int - trigger.from_state.state|int) == 1 }}' - sequence: - - service: input_boolean.turn_off - entity_id: input_boolean.nws_multi_alert - - - alias: 'NWS Weather Alert Pop Up Control' - initial_state: true - trigger: - - platform: state - entity_id: sensor.nws_alerts - condition: - - "{{ states('sensor.nws_alerts') | int > 0 }}" - - '{{ trigger.to_state.state|int > trigger.from_state.state|int }}' - - "{{ (state_attr('sensor.nws_alerts', 'event_id').split('-')[0] not in states.variable.nws_alerts_event_ids.attributes.values()|list) and (state_attr('sensor.nws_alerts', 'event_id').split('-')[0] != states('variable.nws_alerts_event_ids')) }}" - action: - - delay: - seconds: 5 - - choose: - - conditions: - - condition: state - entity_id: input_boolean.nws_multi_alert - state: 'on' - - '{{ (trigger.to_state.state | int - trigger.from_state.state|int) == 2 }}' - - "{{ (state_attr('sensor.nws_alerts', 'event_id').split('-')[1] not in states.variable.nws_alerts_event_ids.attributes.values()|list) and (state_attr('sensor.nws_alerts', 'event_id').split('-')[1] != states('variable.nws_alerts_event_ids')) }}" - sequence: - - service: script.nws_popup_on_wx_alert - data: - title: > - "{{ state_attr('sensor.nws_alerts', 'title').split(' - ')[0] }}" - message: > - "{{ state_attr('sensor.nws_alerts', 'display_desc').split('\n\n-\n\n')[0] }}" - - service: script.nws_popup_on_wx_alert - data: - title: > - "{{ state_attr('sensor.nws_alerts', 'title').split(' - ')[1] }}" - message: > - "{{ state_attr('sensor.nws_alerts', 'display_desc').split('\n\n-\n\n')[1] }}" - - conditions: - - condition: state - entity_id: input_boolean.nws_multi_alert - state: 'on' - - '{{ (trigger.to_state.state | int - trigger.from_state.state|int) == 3 }}' - - "{{ (state_attr('sensor.nws_alerts', 'event_id').split('-')[1] not in states.variable.nws_alerts_event_ids.attributes.values()|list) and (state_attr('sensor.nws_alerts', 'event_id').split('-')[1] != states('variable.nws_alerts_event_ids')) }}" - - "{{ (state_attr('sensor.nws_alerts', 'event_id').split('-')[2] not in states.variable.nws_alerts_event_ids.attributes.values()|list) and (state_attr('sensor.nws_alerts', 'event_id').split('-')[2] != states('variable.nws_alerts_event_ids')) }}" - sequence: - - service: script.nws_popup_on_wx_alert - data: - title: > - "{{ state_attr('sensor.nws_alerts', 'title').split(' - ')[0] }}" - message: > - "{{ state_attr('sensor.nws_alerts', 'display_desc').split('\n\n-\n\n')[0] }}" - - service: script.nws_popup_on_wx_alert - data: - title: > - "{{ state_attr('sensor.nws_alerts', 'title').split(' - ')[1] }}" - message: > - "{{ state_attr('sensor.nws_alerts', 'display_desc').split('\n\n-\n\n')[1] }}" - - service: script.nws_popup_on_wx_alert - data: - title: > - "{{ state_attr('sensor.nws_alerts', 'title').split(' - ')[2] }}" - message: > - "{{ state_attr('sensor.nws_alerts', 'display_desc').split('\n\n-\n\n')[2] }}" - default: - service: script.nws_popup_on_wx_alert - data: - title: > - "{{ state_attr('sensor.nws_alerts', 'title').split(' - ')[0] }}" - message: > - "{{ state_attr('sensor.nws_alerts', 'display_desc').split('\n\n-\n\n')[0] }}" - - - alias: NWS Notification Weather Alert - initial_state: true - trigger: - platform: state - entity_id: sensor.nws_alerts - condition: - - "{{states('sensor.nws_alerts') | int > 0}}" - - '{{ trigger.to_state.state|int > trigger.from_state.state|int }}' - - "{{ (state_attr('sensor.nws_alerts', 'event_id').split('-')[0] not in states.variable.nws_alerts_event_ids.attributes.values()|list) and (state_attr('sensor.nws_alerts', 'event_id').split('-')[0] != states('variable.nws_alerts_event_ids')) }}" - action: - - service: notify.pushbullet_notify - data: - message: > - "NWS: {{ state_attr('sensor.nws_alerts', 'title').split(' - ')[0] }}" - - - alias: NWS Announce Weather Alert - initial_state: true - trigger: - - platform: state - entity_id: sensor.nws_alerts - condition: - condition: and - conditions: - - "{{states('sensor.nws_alerts') | int > 0}}" - - '{{ trigger.to_state.state|int > trigger.from_state.state|int }}' - - "{{ ('Severe Thunderstorm Warning' in state_attr('sensor.nws_alerts', 'title')) or ('Tornado Warning' in state_attr('sensor.nws_alerts', 'title')) }}" - - "{{ (state_attr('sensor.nws_alerts', 'event_id').split('-')[0] not in states.variable.nws_alerts_event_ids.attributes.values()|list) }}" - - "{{ (state_attr('sensor.nws_alerts', 'event_id').split('-')[0] != states('variable.nws_alerts_event_ids')) }}" - action: - - service: media_player.volume_set - data: - entity_id: - - media_player.computer_room_dot - - media_player.kitchen_dot - - media_player.garage_dot - - media_player.basement_dot - - media_player.sunroom_dot - - media_player.livingroom_dot - volume_level: 0.9 - - service: notify.alexa_media - data: - target: - - media_player.computer_room_dot - - media_player.kitchen_dot - - media_player.garage_dot - - media_player.basement_dot - - media_player.sunroom_dot - - media_player.livingroom_dot - data: - type: tts - message: > - {% if 'Severe Thunderstorm Warning' in state_attr('sensor.nws_alerts', 'title') %} - Attention!,,,Attention!,,,The National Weather Service Has issued a severe thunderstorm warning for our area - {% elif 'Tornado Warning' in state_attr('sensor.nws_alerts', 'title') %} - Attention!,,,Attention!,,,The National Weather Service Has issued a tornado warning for our area - {% endif %} - - delay: '00:00:15' - - service: notify.alexa_media - data: - message: "