Hass v0.90 Auth Provider-Trusted Networks-HA stops loading

Is there no code copy/paste function on the the forum.

apart from the message at the top that tells you how to copy/paste and format code? Or did you hide that without reading it?

I hid no messages. What did the message say

haconboot.yaml (295 Bytes)

I just attached the section of the configuration.yaml to make it easier

That doesn’t make it easier. Forcing people to download your yaml file… well I’m not doing it. Just format your code correctly.

According to the semi-formatted code in post 4 it doesn’t look correct.

Don’t worry.I’ll work something out. Thanks for your time though. It’s nice to be nice though!!!

Thanks.

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 ```

It’s like there’s an echo…

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

Well I’ve no chance if that’s the case.

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?

Anyway, try this:

  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

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.

Thanks again.

Well just to update. Tried your suggested change to the configuration.yaml and it has yielded the same error message so it seems that file formatting may not have been the issue here. I’m wondering if there’s an issue with how the Trusted Networks module is being handled in HA.

just as a double check could you post your current config? Post your entire “homeassistant:” section this time (redacted of personal info, of course)

I’m on V90 and my working config looks like this:

  auth_providers:
    - type: homeassistant
    - type: trusted_networks
      trusted_networks:
        #- 127.0.0.1
        - 192.168.1.0/24
        - 172.17.0.0/24

i don’t use legacy api password tho. I could try to put it back in if I need to test it for you but let’s look at your config one more time before I do that.

You know I missed a mistake in your yaml…

type: trusted_networks… the _ is missing in yours. My friend @finity shows that correctly as well but didn’t pick up yours (and mine I copied) was wrong.

1 Like

why, your absolutely right. i completely missed it. good eye.

1 Like

They do say that we tend to look beyond the obvious when problem solving and not to “underscore” this lightly that was indeed the problem.Trusted Networks are now up and running perfectly. Thanks to you both @finity and @DavidFW1960 for casting a keen eye over the relevant section of my configuration.yaml