NWS Integration with multiple stations

I had NWS setup the old way, with this is configuration.yaml:

weather:
  - platform: nws
    api_key: !secret NCDCwebservicekey
    station: KBUR
  - platform: nws
    api_key: !secret NCDCwebservicekey
    station: KLAX

But since upgrade to .109, I’m getting told by the logs to delete that. The updated page in the docs tells me to instead setup via UI in Configuration -> Integrations. So I did. In these new docs, it says “Multiple entries can be configured”, but doesn’t say how.

When I tried to add the integration multiple times with a different METAR station each time, I get an error that the integration already exists.

When I tried to enter multiple METAR stations names, I never get more than two entities. Depending on what I use for a delimiter in the list of stations names, I either get two entities that don’t work or two entities that work but are oddly named, either way it tries to combine the station names into a single station with a long name.

How do I get this new and improved version to track multiple stations?

The docs say:

Multiple entries can be configured, but a unique set of latitude and longitude must be supplied for each.

I added one with the auto filled in coordinates, then I added a second one changing one of the coordinate values by 0.001, and set a different station for each entry. It’s a little awkward, but it works.

I read that line a half dozen times and it wasn’t until you said this that what it actually meant clicked. I changed the lat/lon to the locations of the stations as I entered them and now I have multiple stations again. Thank you.

I read this post 2 days ago and have tried lots of variations of what I think is supposed to happen.
Either it is not working or I did not do it correctly for the second location.
What I want is my lat/long in Phoenix and a lat/long in Milwaukee.
My 70+ year old brain can not make this click.
Can you explain what you did in more detail or post a screen shot of the information.

  1. Hit the “+ Add Integration” button and select “National Weather Service (NWS)”
  2. Enter API Key, stare quizzically at the Lat/Lon coordinates, enter METAR station code.
  3. Hit “Submit”
    3a. If you get “Created configuration for [METAR ID]”, you’re done
    3b. If you get “Service is already configured”, repeat above but at step two change the least significant digit in either Lat or Lon so that the service thinks it is servicing a different location.

The Lat/Lon don’t necessarily need to match the location. If you supply a METAR station code, it will pull from that station regardless of the location specified. But the Lat/Lon needs to be unique for each station you configure in HA. If you don’t specify a METAR station code, it will use the Lat/Lon to find the station closest to the specified coordinates.

You have two choices.

  1. Look up the METAR station codes at https://www.aviationweather.gov/metar and select stations for Pheonix (KPHX) and Milwaukee (KMKE) or others if you are in the suburbs.
  2. Look up the Lat/Lon for the two areas of interest at https://www.latlong.net/ and enter those in with no METAR code and it will choose the closest station to the location specified.
1 Like

Thank you so much. Worked perfectly.

@taylormade Thank for your explanation. I had 2 locations setup previously and wanted to add an additional location where I recently purchased a new property. Unfortunately I couldn’t figure out how I added a second location previously let alone adding yet another. It would appear that the documentation needs to be updated to include basically what you’ve provided here. :+1: