Hi.
I am quite desperate as i cannot find a clue how to configure weather.
集成遇到了。
Then i got myself an api key ofopenweather.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:

    转变:
    …虚拟开关
    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 ofopenweather.orgis

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 "

我想知道配置各节的优先级。
And the standard weather sensor, how to configure it.

There is no priority.

您的代码可能有缩进错误,但是如果您没有按照主题中所述正确格式化代码,我们将无济于事@petrolinked.

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.
我没有改变线条的标识水平,只需移动它们即可。
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.

请显示无效的代码和有效的代码,然后我们可以调查。

That’s not correct.@Burningstoneis 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 theformatted 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 goodworkingconfigurationexample. Cheers!

What issues are you having?