How to configure weather forecast in configuration.yaml

Hi.
I am quite desperate as i cannot find a clue how to configure weather.
Integration met.no is there, but the standard weather panel shows up with “unknown”
Then i got myself an api key of openweather.org,
but it is hard to find out where in configuration.yaml i should insert this:

weather:
‘- platform:openweathermap' ' api_key: `myapikey’

I tried and home assistant looked as if would not start anymore.

My config has the structure:

default_config:
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

weather: – these lines

  • platform: openweathermap – lead to
    api_key: ff859871a… – non starting HA
    mqtt:

    tts:

    switch:
    …virtual switches
    homeassistant:
    packages:
    pack_1: !include …
    google_assistant:

I often find snippets for the config file, but there is never emntioned what would be the right position to insert it. Have often had a non starting HA because of that.

So where should i insert the weather and sensor information,
which in the case of openweather.org is

sensor:

  • platform : openweathermap
    api_key: xx2x3f6w85…
    monitored_conditions:
  • weather`
  • temperature - humidity` would be

Please format your code properly so people can help you. Check out point 11.

Oh, i thought i question to the configuration.yaml basics of HA is a question regarding HA, do i don’t understand " this is a forum for Home Assistant and things related to it "

I would like to know how the priority of the sections of the configuration.yaml is.
And the standard weather sensor, how to configure it.

There is no priority.

You probably have an indentation error in your code but we can’t help you if you don’t format your code correctly as described in the topic that @petro linked.

Read step 11 from the link…

image

You say, “There is no priority. You probably have an indentation error in your code”

This is not possible, as moving the lines to another position would change result, HA will start.
I did not change ident level of lines, just move them.
And so i search for hints if there is a dependency in the sections.

Ok. Issue is solved. I just had to be patient.
I just had to be more patient as i have been. After two minutes unannouced waiting time it went on.
It would have helped if the message “Setting up weather” - or even “Installing weather plugin” would have appeared before installing in the background, and not afterwards, which took approx. 2 minutes… First time i had to wait two minutes without a hint. But happy that i know have my weather

2020-07-16 17_02_04-Übersicht - Home Assistant

This is not possible. The order of the sections in condiguration.yaml doesn’t matter, I’m 100% sure about this. You must have made some other mistake when moving sections.

Please show the code that didn’t work and the code that worked, then we can investigate.

That’s not correct. @Burningstone is correct with his statement:

I showed screenshots which show that the problem is solved. So there is no need to show code, as i there is no problem anymore. A former problem, weeks ago, was that the virtual switches and the section google_assistant seemed to be position dependent, but perhaps this was wrong.

To be exact, the now working code is THE SAME as the one which seemed not to work.
I let run homeassistant on console, i canceled to early the command as the output muted after “setting up light.mqtt”, i already explained this above.
Thank you for your hints, i missed explanations before to the dependency, good to know that there is none.

@Enrico – Glad you got it all figured out!

I see your point, and although you may no longer benefit from sharing the formatted code, it could certainly prove useful to others who are having similar issues. At the very least, it would be a good reference to users looking for a good working configuration example. Cheers!

What issues are you having?