Hurricane Tracking

UPDATE TO CODE.
While following hurricane Beryl’s progress today I realized that there was a problem with the wind speed intensity data. I mistakenly assumed that the data reported was in MPH when in fact it was knots. It’s a simple calculation to convert knots to MPH so here is the corrected code.

    ############################
    #  Hurricane Tracker
    ############################
    - name: "Hurricane 1"
      unique_id: hurricane_1
      state: >-
        {% set winds = (state_attr('sensor.storm_coordinates', "intensity")|int)*1.151 %}
        {% if winds >= 74 and winds <= 95 %}
        {% set intensity = 'Cat 1' %}
        {% elif winds >= 96 and winds <= 110 %}
        {% set intensity = 'Cat 2' %}
        {% elif winds >= 111 and winds <= 129 %}
        {% set intensity = 'Cat 3' %}
        {% elif winds >= 130 and winds <= 156 %}
        {% set intensity = 'Cat 4' %}
        {% elif winds >= 157 %}
        {% set intensity = 'Cat 5' %}
        {% else %}
        {% set intensity = winds %} & ' MPH' 
        {% endif %}
        {{ state_attr('sensor.storm_coordinates', "storm_name") }}, {{ intensity }}
      attributes:
        latitude: >-
          {{ state_attr('sensor.storm_coordinates', "latitude") }}
        longitude: >-
          {{ state_attr('sensor.storm_coordinates', "longitude") }}
        last_updated: >-
          {{states('sensor.date_time')}}

Simply update your code and the Saffir–Simpson Hurricane Category will be correct.

Awesome. Thank you.

I added the category as an attribute .


#############################################################
#                Zone Templates Sensors                      #
#############################################################
- sensor:
############################

############################
#  Hurricane Tracker
############################
  - name: "Hurricane 1"
    unique_id: hurricane_1
    state: >-
      {% set winds = (state_attr('sensor.storm_coordinates', "intensity")|int)*1.151 %}
      {% if winds >= 74 and winds <= 95 %}
      {% set intensity = 'Cat 1' %}
      {% elif winds >= 96 and winds <= 110 %}
      {% set intensity = 'Cat 2' %}
      {% elif winds >= 111 and winds <= 129 %}
      {% set intensity = 'Cat 3' %}
      {% elif winds >= 130 and winds <= 156 %}
      {% set intensity = 'Cat 4' %}
      {% elif winds >= 157 %}
      {% set intensity = 'Cat 5' %}
      {% else %}
      {% set intensity = winds %} & ' MPH'
      {% endif %}
      {{ state_attr('sensor.storm_coordinates', "storm_name") }}, {{ intensity }}
    attributes:
      category: >-
        {% set winds = (state_attr('sensor.storm_coordinates', "intensity")|int)*1.151 %}
        {% if winds >= 74 and winds <= 95 %}
        {% set intensity = 'Cat 1' %}
        {% elif winds >= 96 and winds <= 110 %}
        {% set intensity = 'Cat 2' %}
        {% elif winds >= 111 and winds <= 129 %}
        {% set intensity = 'Cat 3' %}
        {% elif winds >= 130 and winds <= 156 %}
        {% set intensity = 'Cat 4' %}
        {% elif winds >= 157 %}
        {% set intensity = 'Cat 5' %}
        {% else %}
        {% set intensity = winds %} & ' MPH'
        {% endif %}
        {{intensity}}
      latitude: >-
        {{ state_attr('sensor.storm_coordinates', "latitude") }}
      longitude: >-
        {{ state_attr('sensor.storm_coordinates', "longitude") }}
      distance: >-
        {{ state_attr('sensor.storm_coordinates', 'distance') }}
      last_updated: >-
        {{states('sensor.date_time')}}


Nice. Here is a little cleaner way to do that. And remember - once the winds fall below hurricane speeds the badge will report ‘Beryl - XX MPH’. That’s why I changed ‘category’ to ’ max_winds’. It will always look correct, regardless of the nomenclature.
I’m only posting the changes to the attributes section you posted above.

      attributes:
        storm_name: >-
          {% set h1 = states('sensor.hurricane_1') %}
          {{ (h1.split(",")[0]) }}
        max_winds: >-
          {{ (h1.split(", ")[1]) }}          
        latitude: >-
          {{ state_attr('sensor.storm_coordinates', "latitude") }}
        longitude: >-
          {{ state_attr('sensor.storm_coordinates', "longitude") }}
        last_updated: >-
          {{states('sensor.date_time')}}

So now you can create specific messages and reference just the storms name or any other parameter. Enjoy!

** Not fully tested since the NWS feed is offline at the moment. :frowning:

It looks like another storm “One -E” was added but the sensor.storm_coordinates only shows 1. Is that expected?

With the addition of that second storm, lots of things needed fixed so it was a good time to rethink the whole process. Below is the much consolidated new code that supports up to 3 storms. There is not much to change to make it work so here’s the process.

  1. Completely remove the Hurricane Tracker code.
    ############################
    #  Hurricane Tracker
    ############################
    - name: "Hurricane 1"
      unique_id: hurricane_1
  1. Update the Hurricane Storm Coordinates section to look like this:
    ################################
    #  Hurricane Storm Coordinates
    ################################
    - name: "Storm 1 Coordinates"
      unique_id: storm_1_coordinates
      state: >-
        {% set storms = state_attr('sensor.current_storms_data','activeStorms') %}
        {% set winds = (storms[0]['intensity']|int*1.151)|round(2) %}
        {% if winds >= 74 and winds <= 95 %}
        {% set intensity = 'Cat 1' %}
        {% elif winds >= 96 and winds <= 110 %}
        {% set intensity = 'Cat 2' %}
        {% elif winds >= 111 and winds <= 129 %}
        {% set intensity = 'Cat 3' %}
        {% elif winds >= 130 and winds <= 156 %}
        {% set intensity = 'Cat 4' %}
        {% elif winds >= 157 %}
        {% set intensity = 'Cat 5' %}
        {% else %}
        {% set intensity = winds ~ ' MPH' %}
        {% endif %}
        {{ storms[0]['name'] }}, {{intensity }}
      attributes:
        latitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[0]['latitudeNumeric']}}
        longitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[0]['longitudeNumeric']}},
        distance: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{((distance (storms[0]['latitudeNumeric'], storms[0]['longitudeNumeric'])))|round(2) }} miles
        intensity: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[0]['intensity']}}
        storm_name: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ storms[0]['name'] }}
        max_winds: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ (storms[0]['intensity']|int*1.151)|round(2) }} MPH
      icon: mdi:hurricane
#
    - name: "Storm 2 Coordinates"
      unique_id: storm_2_coordinates
      state: >-
        {% set storms = state_attr('sensor.current_storms_data','activeStorms') %}
        {% set winds = (storms[1]['intensity']|int*1.151)|round(2) %}
        {% if winds >= 74 and winds <= 95 %}
        {% set intensity = 'Cat 1' %}
        {% elif winds >= 96 and winds <= 110 %}
        {% set intensity = 'Cat 2' %}
        {% elif winds >= 111 and winds <= 129 %}
        {% set intensity = 'Cat 3' %}
        {% elif winds >= 130 and winds <= 156 %}
        {% set intensity = 'Cat 4' %}
        {% elif winds >= 157 %}
        {% set intensity = 'Cat 5' %}
        {% else %}
        {% set intensity = winds ~ ' MPH' %}
        {% endif %}
        {{ storms[1]['name'] }}, {{intensity }}
      attributes:
        latitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[1]['latitudeNumeric']}}
        longitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[1]['longitudeNumeric']}},
        distance: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{((distance (storms[1]['latitudeNumeric'], storms[1]['longitudeNumeric'])))|round(2) }} miles
        intensity: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[1]['intensity']}}
        storm_name: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ storms[1]['name'] }}
        max_winds: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ (storms[1]['intensity']|int*1.151)|round(2) }} MPH
      icon: mdi:hurricane
#
    - name: "Storm 3 Coordinates"
      unique_id: storm_3_coordinates
      state: >-
        {% set storms = state_attr('sensor.current_storms_data','activeStorms') %}
        {% set winds = (storms[2]['intensity']|int*1.151)|round(2) %}
        {% if winds >= 74 and winds <= 95 %}
        {% set intensity = 'Cat 1' %}
        {% elif winds >= 96 and winds <= 110 %}
        {% set intensity = 'Cat 2' %}
        {% elif winds >= 111 and winds <= 129 %}
        {% set intensity = 'Cat 3' %}
        {% elif winds >= 130 and winds <= 156 %}
        {% set intensity = 'Cat 4' %}
        {% elif winds >= 157 %}
        {% set intensity = 'Cat 5' %}
        {% else %}
        {% set intensity = winds ~ ' MPH' %}
        {% endif %}
        {{ storms[2]['name'] }}, {{intensity }}
      attributes:
        latitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[2]['latitudeNumeric']}}
        longitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[2]['longitudeNumeric']}},
        distance: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{((distance (storms[2]['latitudeNumeric'], storms[2]['longitudeNumeric'])))|round(2) }} miles
        intensity: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[2]['intensity']}}
        storm_name: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ storms[2]['name'] }}
        max_winds: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ (storms[2]['intensity']|int*1.151)|round(2) }} MPH
      icon: mdi:hurricane
#

On your map change the storm entities to:

  - entity: sensor.storm_1_coordinates
    label_mode: state
  - entity: sensor.storm_2_coordinates
    label_mode: state
  - entity: sensor.storm_3_coordinates
    label_mode: state

It’s optional to add sensor 2 or 3. Your choice.
You can also add a 4th or more sensors by duplicating to above code. Just keep in mind that the JSON is 0 based and the sensors start with storm 1 (so an offset of 1 is needed as seen in the code.)

Optionally, I repurposed the original “Storm Coordinates” to a “Storm Count”.
That code is:

    ############################
    #  Hurricane Storm Count
    ############################
    - name: "Storm Count"
      unique_id: storm_count
      state: >-
        {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
        {% for i in range(0, storms | count ) %}
        {% endfor %}
        {{storms[i] | count + 1 }}
      icon: mdi:hurricane
#

This should be the final code, as it addresses all the needs of all previous code plus enabling multiple storm tracking at one time. It also consolidates the code greatly. Please let me know if you have any trouble.

Awesome!!. This works great.

Are you getting 2 on the count?

Change it like below. I’ll admit it, I was not familiar with the original code you used and didn’t notice the value was wrong. I tinkered with that code for a bit but couldn’t get it to produce the correct result. This code is cleaner, simpler and works much better.

    ############################
    #  Hurricane Storm Count
    ############################
    - name: "Storm Count"
      unique_id: storm_count
      state: >-
        {{ state_attr('sensor.current_storms_data','activeStorms') | map(attribute='id') | list | count }}
      icon: mdi:hurricane
    #

Thanks for starting on the original project. This is something I’ve always wanted but didn’t know where to begin. Your base code was a great jumping in point for me and I’ve learned a lot in the process. Win/Win.

I’m definitely the one learning here and that I have!

Thank you again.

If anyone else is tracking this, the automation below will notify you of an additional named storm:


alias: Hurricane and Tropical Storm Notification - Newly Named
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.storm_count
condition:
  - condition: template
    value_template: "{{trigger.to_state.state > trigger.from_state.state}}"
action:
  - service: notify.mobile_app_xxxxxx
    metadata: {}
    data:
      message: Newly Named Hurricane or Tropical Storm
mode: single

1 Like

Added Tropical Depression (TD) and Tropical Storm (TS) criteria and labels.

#################################
    #  Hurricane Storm Coordinates
    ################################
    - name: "Storm 1 Coordinates"
      unique_id: storm_1_coordinates
      state: >-
        {% set storms = state_attr('sensor.current_storms_data','activeStorms') %}
        {% set winds = (storms[0]['intensity']|int*1.151)|round(2) %}
        {% if winds < 34 %}
        {% set intensity = 'TD' %}
        {% elif winds >= 34 and winds <= 73 %}
        {% set intensity = 'TS' %}
        {% elif winds >= 74 and winds <= 95 %}
        {% set intensity = 'Cat 1' %}
        {% elif winds >= 96 and winds <= 110 %}
        {% set intensity = 'Cat 2' %}
        {% elif winds >= 111 and winds <= 129 %}
        {% set intensity = 'Cat 3' %}
        {% elif winds >= 130 and winds <= 156 %}
        {% set intensity = 'Cat 4' %}
        {% elif winds >= 157 %}
        {% set intensity = 'Cat 5' %}
        {% else %}
        {% set intensity = winds ~ ' MPH' %}
        {% endif %}
        {{ storms[0]['name'] }}, {{intensity }}
      attributes:
        latitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[0]['latitudeNumeric']}}
        longitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[0]['longitudeNumeric']}},
        distance: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{((distance (storms[0]['latitudeNumeric'], storms[0]['longitudeNumeric'])))|round(2) }} miles
        intensity: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[0]['intensity']}}
        storm_name: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ storms[0]['name'] }}
        max_winds: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ (storms[0]['intensity']|int*1.151)|round(2) }} MPH
      icon: mdi:hurricane
#
    - name: "Storm 2 Coordinates"
      unique_id: storm_2_coordinates
      state: >-
        {% set storms = state_attr('sensor.current_storms_data','activeStorms') %}
        {% set winds = (storms[1]['intensity']|int*1.151)|round(2) %}
        {% if winds < 34 %}
        {% set intensity = 'TD' %}
        {% elif winds >= 34 and winds <= 73 %}
        {% set intensity = 'TS' %}
        {% elif winds >= 74 and winds <= 95 %}
        {% set intensity = 'Cat 1' %}
        {% elif winds >= 96 and winds <= 110 %}
        {% set intensity = 'Cat 2' %}
        {% elif winds >= 111 and winds <= 129 %}
        {% set intensity = 'Cat 3' %}
        {% elif winds >= 130 and winds <= 156 %}
        {% set intensity = 'Cat 4' %}
        {% elif winds >= 157 %}
        {% set intensity = 'Cat 5' %}
        {% else %}
        {% set intensity = winds ~ ' MPH' %}
        {% endif %}
        {{ storms[1]['name'] }}, {{intensity }}
      attributes:
        latitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[1]['latitudeNumeric']}}
        longitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[1]['longitudeNumeric']}},
        distance: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{((distance (storms[1]['latitudeNumeric'], storms[1]['longitudeNumeric'])))|round(2) }} miles
        intensity: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[1]['intensity']}}
        storm_name: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ storms[1]['name'] }}
        max_winds: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ (storms[1]['intensity']|int*1.151)|round(2) }} MPH
      icon: mdi:hurricane
#
    - name: "Storm 3 Coordinates"
      unique_id: storm_3_coordinates
      state: >-
        {% set storms = state_attr('sensor.current_storms_data','activeStorms') %}
        {% set winds = (storms[2]['intensity']|int*1.151)|round(2) %}
        {% if winds < 34 %}
        {% set intensity = 'TD' %}
        {% elif winds >= 34 and winds <= 73 %}
        {% set intensity = 'TS' %}
        {% elif winds >= 74 and winds <= 95 %}
        {% set intensity = 'Cat 1' %}
        {% elif winds >= 96 and winds <= 110 %}
        {% set intensity = 'Cat 2' %}
        {% elif winds >= 111 and winds <= 129 %}
        {% set intensity = 'Cat 3' %}
        {% elif winds >= 130 and winds <= 156 %}
        {% set intensity = 'Cat 4' %}
        {% elif winds >= 157 %}
        {% set intensity = 'Cat 5' %}
        {% else %}
        {% set intensity = winds ~ ' MPH' %}
        {% endif %}
        {{ storms[2]['name'] }}, {{intensity }}
      attributes:
        latitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[2]['latitudeNumeric']}}
        longitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[2]['longitudeNumeric']}},
        distance: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{((distance (storms[2]['latitudeNumeric'], storms[2]['longitudeNumeric'])))|round(2) }} miles
        intensity: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[2]['intensity']}}
        storm_name: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ storms[2]['name'] }}
        max_winds: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ (storms[2]['intensity']|int*1.151)|round(2) }} MPH
      icon: mdi:hurricane

Should this be moved to git or something? It would be cool if this was a hacs integration or something, thoughts?

1 Like

I started this thread and, with the bulk of the heavy lifting done by @kartcon, it turned into a very nice tool, especially right now as the storms are popping up. I can’t speak for @kartcon, but I’d love for this to be taken up by someone who can polish it and maintain it - that’s just not me with my limited coding skills.

There are a few enhancements I’ve added to mine that lead to even more possibilities. For example, I’ve added the attribute location (binNumber) that will let you know if it’s an Atlantic (ATx), Eastern Pacific (EPx) or Central Pacific (CPx) named storm. Currenthly this tracks all NHC storms but rarely would someone want to keep up with Atlantic and Pacific storms. It would be nice to be able to filter the NHC data so if someone were only interested in a particular region, it would narrow that down. I’m sure there are other enhancements but, again, it’s easier for me to see use cases than to find solutions for them!!

is there a complete example of what someone who hasn’t set up anything yet from thread should do step by step. Its kinda hard to follow what exactly needs added where due to the revisions

I’ll try to capture everything over a few posts:

  1. Add or create a rest sensor to pull in the raw data from the NHC:
- platform: rest
  name: Current Storms Data
  unique_id: current_storms_data
  resource: https://www.nhc.noaa.gov/CurrentStorms.json
  method: GET
  value_template: "{{ value_json.storms }}"
  json_attributes:
   - activeStorms
  scan_interval: 3600  
1 Like
  1. Add or create the following templates to get a count of the number of active storms and then the data for up to 5 active storms
#############################################################
#                    Templates Sensors                      #
#############################################################
- sensor:
#################################
    #  Hurricane Storm Coordinates
    ################################
    - name: "Storm 1 Coordinates"
      unique_id: storm_1_coordinates
      state: >-
        {% set storms = state_attr('sensor.current_storms_data','activeStorms') %}
        {% set winds = (storms[0]['intensity']|int*1.151)|round(2) %}
        {% if winds < 34 %}
        {% set intensity = 'TD' %}
        {% elif winds >= 34 and winds <= 73 %}
        {% set intensity = 'TS' %}
        {% elif winds >= 74 and winds <= 95 %}
        {% set intensity = 'Cat 1' %}
        {% elif winds >= 96 and winds <= 110 %}
        {% set intensity = 'Cat 2' %}
        {% elif winds >= 111 and winds <= 129 %}
        {% set intensity = 'Cat 3' %}
        {% elif winds >= 130 and winds <= 156 %}
        {% set intensity = 'Cat 4' %}
        {% elif winds >= 157 %}
        {% set intensity = 'Cat 5' %}
        {% else %}
        {% set intensity = winds ~ ' MPH' %}
        {% endif %}
        {{ storms[0]['name'] }}, {{intensity }}
      attributes:
        location: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{(storms[0]['binNumber'])[:2]}}
        latitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[0]['latitudeNumeric']}}
        longitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[0]['longitudeNumeric']}},
        distance: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{((distance (storms[0]['latitudeNumeric'], storms[0]['longitudeNumeric'])))|round(2) }}
        intensity: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[0]['intensity']}}
        storm_name: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ storms[0]['name'] }}
        max_winds: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ (storms[0]['intensity']|int*1.151)|round(2) }}
      icon: mdi:hurricane
#
    - name: "Storm 2 Coordinates"
      unique_id: storm_2_coordinates
      state: >-
        {% set storms = state_attr('sensor.current_storms_data','activeStorms') %}
        {% set winds = (storms[1]['intensity']|int*1.151)|round(2) %}
        {% if winds < 34 %}
        {% set intensity = 'TD' %}
        {% elif winds >= 34 and winds <= 73 %}
        {% set intensity = 'TS' %}
        {% elif winds >= 74 and winds <= 95 %}
        {% set intensity = 'Cat 1' %}
        {% elif winds >= 96 and winds <= 110 %}
        {% set intensity = 'Cat 2' %}
        {% elif winds >= 111 and winds <= 129 %}
        {% set intensity = 'Cat 3' %}
        {% elif winds >= 130 and winds <= 156 %}
        {% set intensity = 'Cat 4' %}
        {% elif winds >= 157 %}
        {% set intensity = 'Cat 5' %}
        {% else %}
        {% set intensity = winds ~ ' MPH' %}
        {% endif %}
        {{ storms[1]['name'] }}, {{intensity }}
      attributes:
        location: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{(storms[1]['binNumber'])[:2]}}
        latitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[1]['latitudeNumeric']}}
        longitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[1]['longitudeNumeric']}},
        distance: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{((distance (storms[1]['latitudeNumeric'], storms[1]['longitudeNumeric'])))|round(2) }}
        intensity: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[1]['intensity']}}
        storm_name: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ storms[1]['name'] }}
        max_winds: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ (storms[1]['intensity']|int*1.151)|round(2) }}
      icon: mdi:hurricane
#
    - name: "Storm 3 Coordinates"
      unique_id: storm_3_coordinates
      state: >-
        {% set storms = state_attr('sensor.current_storms_data','activeStorms') %}
        {% set winds = (storms[2]['intensity']|int*1.151)|round(2) %}
        {% if winds < 34 %}
        {% set intensity = 'TD' %}
        {% elif winds >= 34 and winds <= 73 %}
        {% set intensity = 'TS' %}
        {% elif winds >= 74 and winds <= 95 %}
        {% set intensity = 'Cat 1' %}
        {% elif winds >= 96 and winds <= 110 %}
        {% set intensity = 'Cat 2' %}
        {% elif winds >= 111 and winds <= 129 %}
        {% set intensity = 'Cat 3' %}
        {% elif winds >= 130 and winds <= 156 %}
        {% set intensity = 'Cat 4' %}
        {% elif winds >= 157 %}
        {% set intensity = 'Cat 5' %}
        {% else %}
        {% set intensity = winds ~ ' MPH' %}
        {% endif %}
        {{ storms[2]['name'] }}, {{intensity }}
      attributes:
        location: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{(storms[2]['binNumber'])[:2]}}
        latitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[2]['latitudeNumeric']}}
        longitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[2]['longitudeNumeric']}},
        distance: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{((distance (storms[2]['latitudeNumeric'], storms[2]['longitudeNumeric'])))|round(2) }}
        intensity: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[2]['intensity']}}
        storm_name: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ storms[2]['name'] }}
        max_winds: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ (storms[2]['intensity']|int*1.151)|round(2) }}
      icon: mdi:hurricane
      
    - name: "Storm 4 Coordinates"
      unique_id: storm_4_coordinates
      state: >-
        {% set storms = state_attr('sensor.current_storms_data','activeStorms') %}
        {% set winds = (storms[3]['intensity']|int*1.151)|round(2) %}
        {% if winds < 34 %}
        {% set intensity = 'TD' %}
        {% elif winds >= 34 and winds <= 73 %}
        {% set intensity = 'TS' %}
        {% elif winds >= 74 and winds <= 95 %}
        {% set intensity = 'Cat 1' %}
        {% elif winds >= 96 and winds <= 110 %}
        {% set intensity = 'Cat 2' %}
        {% elif winds >= 111 and winds <= 129 %}
        {% set intensity = 'Cat 3' %}
        {% elif winds >= 130 and winds <= 156 %}
        {% set intensity = 'Cat 4' %}
        {% elif winds >= 157 %}
        {% set intensity = 'Cat 5' %}
        {% else %}
        {% set intensity = winds ~ ' MPH' %}
        {% endif %}
        {{ storms[3]['name'] }}, {{intensity }}
      attributes:
        location: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{(storms[3]['binNumber'])[:2]}}
        latitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[3]['latitudeNumeric']}}
        longitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[3]['longitudeNumeric']}},
        distance: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{((distance (storms[3]['latitudeNumeric'], storms[3]['longitudeNumeric'])))|round(2) }}
        intensity: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[3]['intensity']}}
        storm_name: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ storms[3]['name'] }}
        max_winds: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ (storms[3]['intensity']|int*1.151)|round(2) }}
      icon: mdi:hurrice
    
    - name: "Storm 5 Coordinates"
      unique_id: storm_5_coordinates
      state: >-
        {% set storms = state_attr('sensor.current_storms_data','activeStorms') %}
        {% set winds = (storms[4]['intensity']|int*1.151)|round(2) %}
        {% if winds < 34 %}
        {% set intensity = 'TD' %}
        {% elif winds >= 34 and winds <= 73 %}
        {% set intensity = 'TS' %}
        {% elif winds >= 74 and winds <= 95 %}
        {% set intensity = 'Cat 1' %}
        {% elif winds >= 96 and winds <= 110 %}
        {% set intensity = 'Cat 2' %}
        {% elif winds >= 111 and winds <= 129 %}
        {% set intensity = 'Cat 3' %}
        {% elif winds >= 130 and winds <= 156 %}
        {% set intensity = 'Cat 4' %}
        {% elif winds >= 157 %}
        {% set intensity = 'Cat 5' %}
        {% else %}
        {% set intensity = winds ~ ' MPH' %}
        {% endif %}
        {{ storms[4]['name'] }}, {{intensity }}
      attributes:
        location: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{(storms[4]['binNumber'])[:2]}}
        latitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[4]['latitudeNumeric']}}
        longitude: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[4]['longitudeNumeric']}},
        distance: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{((distance (storms[4]['latitudeNumeric'], storms[4]['longitudeNumeric'])))|round(2) }}
        intensity: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{storms[4]['intensity']}}
        storm_name: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ storms[4]['name'] }}
        max_winds: >-
          {% set storms = state_attr('sensor.current_storms_data','activeStorms')%}
          {{ (storms[4]['intensity']|int*1.151)|round(2) }} 
      icon: mdi:hurricane
      
      
      
      
#
############################
    #  Hurricane Storm Count
    ############################
    - name: "Storm Count"
      unique_id: storm_count
      state: >-
        {{ state_attr('sensor.current_storms_data','activeStorms') | map(attribute='id') | list | count }}
      icon: mdi:hurricane
    #

1 Like

Create a map card with the following

type: map
entities:
  - entity: sensor.storm_1_coordinates
    label_mode: state
  - entity: sensor.storm_2_coordinates
    label_mode: state
  - entity: sensor.storm_3_coordinates
    label_mode: state
  - entity: sensor.storm_4_coordinates
    label_mode: state
geo_location_sources: []
default_zoom: 2
hours_to_show: 12
title: Active Hurricanes
theme_mode: auto

I also created some automatons to let me know what a new named storm was added or when a storm was within a certain distance from my home.

alias: Hurricane and Tropical Storm Notification - Newly Named Atlantic
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.storm_count
condition:
  - condition: template
    value_template: "{{trigger.to_state.state > trigger.from_state.state}}"
  - condition: template
    value_template: >-
      {{"AT" in state_attr('sensor.current_storms_data',
      'activeStorms')[states('sensor.storm_count')|int-1].binNumber}}
action:
  - service: notify.mobile_app_
    metadata: {}
    data:
      message: Newly Named Atlantic Hurricane or Tropical Storm.
mode: single

alias: Hurricane within 500 miles warning
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.storm_1_coordinates
    attribute: distance
    below: 500
  - platform: numeric_state
    entity_id:
      - sensor.storm_2_coordinates
    attribute: distance
    below: 500
  - platform: numeric_state
    entity_id:
      - sensor.storm_3_coordinates
    attribute: distance
    below: 500
  - platform: numeric_state
    entity_id:
      - sensor.storm_4_coordinates
    attribute: distance
    below: 500
  - platform: numeric_state
    entity_id:
      - sensor.storm_5_coordinates
    attribute: distance
    below: 500
condition: []
action:
  - service: notify.mobile_app
    metadata: {}
    data:
      message: "Hurricane within 500 miles "
mode: single

1 Like

I’d like to filter the original NHC data to show an Atlantic or non-Atlantic storm so only those show on the map or in the data but I’m not there yet.