Openweathermap - platform setup error

Running Home Assistant in Docker on Raspbian on a RP4.

Originally I setup the OpenWeatherMap integration through the UI. I recently wanted to switch and configure it via my configuration.yaml, so I deleted the integration from the UI and added the following to my configuration.yaml:

weather:
  - platform: openweathermap
    api_key: !secret openweathermap_api_key
    mode: daily

When I restarted Home Assistant, I got the following error:

home-assistant   | 2020-11-13 09:28:51 ERROR (MainThread) [homeassistant.components.weather] The openweathermap platform for the weather integration does not support platform setup. Please remove it from your config.

I see plenty of examples in the forums which imply that should work. And when I look at the Integration page in Home Assistant, I can see OpenWeatherMap. So, I went and removed the openweathermap integration from configuration.yaml, restarted Home Assistant, and got the following error:

home-assistant   | 2020-11-13 09:58:27 ERROR (MainThread) [homeassistant.components.openweathermap.forecast_update_coordinator] Error fetching openweathermap data: Your API subscription level does not allow to perform this operation
home-assistant   | Reason: Invalid API Key provided

Which would make sense, since I’m not using a paid account. Except… I thought I just removed the integration! If I refresh the Integrations page, OpenWeatherMap is there again!

All of which leaves me very confused. What am I missing?

2 Likes

I HAVE the same problem, someone knows something.
Thanks in advance

1 Like

Same issue here - maybe for some time, cause I had HA running without maintenance for approx 6 months now.

Hi, I basically had the same problem. The answer is :

  1. make a note of your API key
  2. remove the Openweathermap platform definition from your configuration.yaml
  3. delete the OpenWeathermap integration
  4. reboot HA
  5. Go ‘Configuration’ >> ‘Integrations’ & +New Integration
    you will then be prompted to enter your API key (all other fields should be pre-populated) and if you want reboot HA again (just to keep things tidy)

For any further info. please see:

2 Likes

Spot on, I just carried out this process and my OpenWeatherMap integration is working fine once again with no errors in the log :smiley:

Cheers Morgan.

Hi,

when I enter my api-key the integration just aborts.

image

I’m getting this same error too.

1 Like

So can you not setup openweathermap from the configuration.yaml? Is Home Assistant moving away from file configurations?

Came here for the same reason. It’s a shame that there’s no option to set it up using configuration.yaml.

This is very useful to me as I’m running 2 instances of Home Assistant:

  • production
  • staging

The idea is to fix things that break between the upgrades on staging rather than try debug it on prod (and cause inconvenience to others relying on HA). I don’t want to repeat same steps over and over again when I deploy upgrades so configuraiton.yaml is the best option as I have it versioned in my repo.

Hopefully this won’t get killed or we’ll get a suitable equivalent :crossed_fingers:

I’m also confused about this. At first I thought the reason why the integration docs don’t include a yaml configuration example was just because the docs are incomplete. As @brettinternet asked, is HA moving away from file configurations? That’s the main reason I use HA and haven’t looked at alternatives yet.

If this is the case, can we please update the docs to make that clear? This excerpt doesn’t state that using the UI is the only way to set up this integration.

Adding OpenWeatherMap to your Home Assistant instance can be done via the user interface, by using this My button:

Anyone? This is a REALLY bad decision if the yaml based configurations are removed.

I have just discovered the same thing, but with the Met Office weather integration. It looks like YAML support is being removed from some types of integrations due to a flow requiring a manual step from the user.

1 Like