As per advice I am redoing my HA authentication methods and have just added trusted networks as per the documentation in the configuration.yaml. All indents are formatted correctly.
fd00::/8
Since adding the above trusted networks I now see this error in the HA log
2019-04-04 22:45:29 ERROR (MainThread) [homeassistant.auth.providers] Unable to load auth provider trusted networks: No module named āhomeassistant.auth.providers.trusted networksā
2019-04-04 22:45:29 ERROR (MainThread) [homeassistant.bootstrap] Home Assistant core failed to initialize. Further initialization aborted
As soon as I comment out the section referring to trusted networks HA starts ok. Have I missed out something while configuring trusted networks in the configuration.yaml
use three backticks - next to 1 and under ~ on your keyboard. `
three on one line, new line add code, new line three more backticks and itās formatted correctly.
I thought the error message I saw in the log might have indicated I hadnāt configured something else.If itās just down to formatting of the entry in the configuration.yaml I should be able to sort that out. Iāve never has issues with entries in the configuration.yaml before so I suppose thereās always a first.
auth_providers:
- type: homeassistant
- type: legacy_api_password
api_password: !secret http_password
- type: trusted networks
trusted_networks:
- 192.168.0.1
- 192.168.0.38
- 192.168.0.122
- 192.168.0.45
- fd00::/8
I managed to sort one problem out. At least I know what to do in future. Three of these at the start of the copy paste did the job ```
but you need three on a line after the code as well otherwise it formats your comments as code as wellā¦
I think itās your indentingā¦ when you increase the indent, you add 2 spacesā¦ so the - should be under the t in auth - move everything one space to the right (except the trusted networks section - that is correct_
the -'s will all line up
EDIT: Yes I know the docs say otherwise and I just submitted a PR to correct them
I get the RTFM comments which are not needed as I always read the documentation.
I followed exactly what it stated in the Auth Providers section to the letter of the law but you now state that itās incorrect. Is that the case.
Could you possibly post back exactly how the code should look so others will benefit from it. How did you discover the problem. Was it by trial and error.
No. When you have experience with YAML you see the errors pretty easily which is why itās essential you post using code blocks! As you can see, itās impossible to see a problem if you donāt do that.
Sometimes the docs are wrongā¦ when that happens you edit them and move on and it helps someone else.
I actually told you what to do to fix your codeā¦ did you not understand what I said?
Thanks for the assistance. Iāll try that and see if it solves the problem.
By any chance are/were you a primary school teacher. Of course the ābackticksā you refer to are single back quotation marks. Lesson now understood.