Dynamic weather location

My understanding is that Metno supports this, but only if you keep the original integration setup when you first start home assistant.

what do you mean? isn’t this the original one??

What I mean is that the very first time you start your home assistant server it sets up Met.no integration to use whatever is used for the latitude and longitude in home assistant. So you could use this for an RV for example, where the whole system moves, but not a single device.

If you manually add this integration later, this is not possible currently.

Is this still not possible?

I’d be fine using the restful and template sensor approach, but darksky is no more. Anyone have a current workaround?

You could use a template weather setup together with a REST interface to get some info elsewhere.

Unfortunately, without a good example of a specific weather provider this is beyond me (or at least beyond the amount of time/effort I’m willing to give it). Wunderground is my preferred source (I’ve found it to be the most accurate, at least for my home). Here’s a sample of the API response in case someone is bored and wants to put it together for me. :slight_smile:

Links (with my private API key removed):

https://api.weather.com/v3/wx/forecast/daily/5day?geocode=39.1,-94.6&format=json&units=e&language=en-US&apiKey=yourApiKey

{
  "calendarDayTemperatureMax": [83, 77, 82, 80, 84, 76],
  "calendarDayTemperatureMin": [67, 64, 62, 66, 67, 63],
  "dayOfWeek": [
    "Tuesday",
    "Wednesday",
    "Thursday",
    "Friday",
    "Saturday",
    "Sunday"
  ],
  "expirationTimeUtc": [1695155854, 1695155854, 1695155854, 1695155854, 1695155854, 1695155854],
  "moonPhase": [
    "Waxing Crescent",
    "Waxing Crescent",
    "Waxing Crescent",
    "First Quarter",
    "Waxing Gibbous",
    "Waxing Gibbous"
  ],
  "moonPhaseCode": [
    "WXC",
    "WXC",
    "WXC",
    "FQ",
    "WXG",
    "WXG"
  ],
  "moonPhaseDay": [4, 5, 6, 7, 8, 9],
  "moonriseTimeLocal": [
    "2023-09-19T11:33:39-0500",
    "2023-09-20T12:41:48-0500",
    "2023-09-21T13:49:48-0500",
    "2023-09-22T14:55:44-0500",
    "2023-09-23T15:54:57-0500",
    "2023-09-24T16:45:44-0500"
  ],
  "moonriseTimeUtc": [1695141219, 1695231708, 1695322188, 1695412544, 1695502497, 1695591944],
  "moonsetTimeLocal": [
    "2023-09-19T21:32:00-0500",
    "2023-09-20T22:08:03-0500",
    "2023-09-21T22:52:55-0500",
    "2023-09-22T23:48:31-0500",
    "",
    "2023-09-24T00:55:26-0500"
  ],
  "moonsetTimeUtc": [1695177120, 1695265683, 1695354775, 1695444511, null, 1695534926],
  "narrative": [
    "Thundershowers. Lows overnight in the mid 60s.",
    "Showers ending by midday. Highs in the upper 70s and lows in the low 60s.",
    "Times of sun and clouds. Highs in the low 80s and lows in the mid 60s.",
    "Morning showers and thunderstorms. Highs in the low 80s and lows in the upper 60s.",
    "A few thunderstorms possible. Potential for severe thunderstorms. Highs in the mid 80s and lows in the low 60s.",
    "A few morning showers. Highs in the mid 70s and lows in the low 60s."
  ],
  "qpf": [0.17, 0.02, 0.09, 0.24, 0.37, 0.01],
  "qpfSnow": [0, 0, 0, 0, 0, 0],
  "sunriseTimeLocal": [
    "2023-09-19T07:03:04-0500",
    "2023-09-20T07:03:58-0500",
    "2023-09-21T07:04:51-0500",
    "2023-09-22T07:05:45-0500",
    "2023-09-23T07:06:39-0500",
    "2023-09-24T07:07:33-0500"
  ],
  "sunriseTimeUtc": [1695124984, 1695211438, 1695297891, 1695384345, 1695470799, 1695557253],
  "sunsetTimeLocal": [
    "2023-09-19T19:20:12-0500",
    "2023-09-20T19:18:35-0500",
    "2023-09-21T19:16:59-0500",
    "2023-09-22T19:15:22-0500",
    "2023-09-23T19:13:46-0500",
    "2023-09-24T19:12:10-0500"
  ],
  "sunsetTimeUtc": [1695169212, 1695255515, 1695341819, 1695428122, 1695514426, 1695600730],
  "temperatureMax": [null, 77, 82, 80, 84, 76],
  "temperatureMin": [65, 62, 66, 67, 63, 60],
  "validTimeLocal": [
    "2023-09-19T07:00:00-0500",
    "2023-09-20T07:00:00-0500",
    "2023-09-21T07:00:00-0500",
    "2023-09-22T07:00:00-0500",
    "2023-09-23T07:00:00-0500",
    "2023-09-24T07:00:00-0500"
  ],
  "validTimeUtc": [1695124800, 1695211200, 1695297600, 1695384000, 1695470400, 1695556800],
  "daypart": [
    {
      "cloudCover": [null, 79, 79, 41, 54, 67, 61, 48, 62, 60, 47, 23],
      "dayOrNight": [null, "N",
        "D",
        "N",
        "D",
        "N",
        "D",
        "N",
        "D",
        "N",
        "D",
        "N"
      ],
      "daypartName": [null, "Tonight",
        "Tomorrow",
        "Tomorrow night",
        "Thursday",
        "Thursday night",
        "Friday",
        "Friday night",
        "Saturday",
        "Saturday night",
        "Sunday",
        "Sunday night"
      ],
      "iconCode": [null, 11, 39, 29, 30, 47, 38, 47, 38, 47, 39, 29],
      "iconCodeExtend": [null, 1140, 6103, 2900, 3000, 3809, 6203, 3809, 3800, 3809, 6103, 2900],
      "narrative": [null, "Occasional showers with a thunderstorm possible. Low near 65F. Winds S at 10 to 20 mph. Chance of rain 50%.",
        "Showers in the morning, then cloudy in the afternoon. High 77F. Winds SE at 5 to 10 mph. Chance of rain 40%.",
        "Partly cloudy skies. Low 62F. Winds ESE at 5 to 10 mph.",
        "Intervals of clouds and sunshine. High 82F. Winds ESE at 5 to 10 mph.",
        "Partly to mostly cloudy with a chance of thunderstorms. Low 66F. Winds SE at 5 to 10 mph. Chance of rain 50%.",
        "Scattered thunderstorms in the morning. Partly cloudy skies late. High near 80F. Winds SSE at 10 to 15 mph. Chance of rain 50%.",
        "Scattered showers and thunderstorms. Low 67F. Winds SSE at 10 to 15 mph. Chance of rain 60%.",
        "Scattered showers and thunderstorms. Potential for severe thunderstorms. High 84F. Winds S at 10 to 20 mph. Chance of rain 50%.",
        "Scattered showers and thunderstorms. Potential for severe thunderstorms. Low 63F. Winds SW at 10 to 15 mph. Chance of rain 60%.",
        "Chance of a shower or two during the morning, followed by partly cloudy skies in the afternoon. High 76F. Winds W at 10 to 15 mph. Chance of rain 30%.",
        "Some clouds early will give way to generally clear conditions overnight. Low around 60F. Winds NW at 5 to 10 mph."
      ],
      "precipChance": [null, 50, 38, 15, 18, 47, 51, 61, 46, 58, 34, 16],
      "precipType": [null, "rain",
        "rain",
        "rain",
        "rain",
        "rain",
        "rain",
        "rain",
        "rain",
        "rain",
        "rain",
        "rain"
      ],
      "qpf": [null, 0.17, 0.02, 0, 0, 0.09, 0.07, 0.17, 0.06, 0.31, 0.01, 0],
      "qpfSnow": [null, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      "qualifierCode": [null, null, null, null, null, null, null, null, "Q9605",
        "Q9605",
        null, null],
      "qualifierPhrase": [null, null, null, null, null, null, null, null, "Potential for severe thunderstorms.",
        "Potential for severe thunderstorms.",
        null, null],
      "relativeHumidity": [null, 68, 75, 88, 73, 84, 81, 85, 74, 80, 74, 80],
      "snowRange": [null, "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        "",
        ""
      ],
      "temperature": [null, 65, 77, 62, 82, 66, 80, 67, 84, 63, 76, 60],
      "temperatureHeatIndex": [null, 81, 77, 74, 83, 80, 82, 81, 87, 83, 76, 71],
      "temperatureWindChill": [null, 65, 66, 62, 64, 66, 67, 67, 68, 63, 64, 60],
      "thunderCategory": [null, "Thunder expected",
        "No thunder",
        "No thunder",
        "No thunder",
        "Thunder expected",
        "Thunder expected",
        "Thunder expected",
        "Severe thunderstorms possible",
        "Severe thunderstorms possible",
        "No thunder",
        "No thunder"
      ],
      "thunderIndex": [null, 2, 0, 0, 0, 2, 2, 2, 3, 3, 0, 0],
      "uvDescription": [null, "Low",
        "Moderate",
        "Low",
        "High",
        "Low",
        "Moderate",
        "Low",
        "Moderate",
        "Low",
        "High",
        "Low"
      ],
      "uvIndex": [null, 0, 4, 0, 7, 0, 5, 0, 5, 0, 6, 0],
      "windDirection": [null, 176, 144, 106, 117, 135, 165, 158, 174, 214, 270, 322],
      "windDirectionCardinal": [null, "S",
        "SE",
        "ESE",
        "ESE",
        "SE",
        "SSE",
        "SSE",
        "S",
        "SW",
        "W",
        "NW"
      ],
      "windPhrase": [null, "Winds S at 10 to 20 mph.",
        "Winds SE at 5 to 10 mph.",
        "Winds ESE at 5 to 10 mph.",
        "Winds ESE at 5 to 10 mph.",
        "Winds SE at 5 to 10 mph.",
        "Winds SSE at 10 to 15 mph.",
        "Winds SSE at 10 to 15 mph.",
        "Winds S at 10 to 20 mph.",
        "Winds SW at 10 to 15 mph.",
        "Winds W at 10 to 15 mph.",
        "Winds NW at 5 to 10 mph."
      ],
      "windSpeed": [null, 16, 9, 9, 9, 9, 11, 11, 13, 11, 10, 7],
      "wxPhraseLong": [null, "Thundershowers",
        "AM Showers",
        "Partly Cloudy",
        "Partly Cloudy",
        "Scattered Thunderstorms",
        "AM Thunderstorms",
        "Scattered Thunderstorms",
        "Scattered Thunderstorms",
        "Scattered Thunderstorms",
        "AM Showers",
        "Partly Cloudy"
      ],
      "wxPhraseShort": [null, "T-Showers",
        "AM Showers",
        "P Cloudy",
        "P Cloudy",
        "Sct T-Storms",
        "AM T-Storms",
        "Sct T-Storms",
        "Sct T-Storms",
        "Sct T-Storms",
        "AM Showers",
        "P Cloudy"
      ]
    }
  ]
}

The same goes for me. I don’t have the time needed to figure this out. But with a little knowledge of HA you should be able to get this working within an hour. Just use the REST sensor to get the results from WeatherUnderground and then use the developer tools to get the JSON from there. If this succeeds you can copy the templates to the Weather configuration.