Issues adding trusted users

hello,

i am trying to set up casting to my nest hub using this guide, and am running into an issue when adding the nest hub as a trusted user. when i add the trusted user, ha goes into safe mode and i get the following error

2023-05-16 21:05:20.895 ERROR (MainThread) [homeassistant.auth.providers] Invalid configuration for auth provider trusted_networks: expected a dictionary for dictionary value @ data['trusted_users']. Got [OrderedDict([('192.168.1.XXX', '<user-id>')])]
2023-05-16 21:05:20.895 ERROR (MainThread) [homeassistant.config] Invalid config for [homeassistant]: expected a dictionary for dictionary value @ data['trusted_users']. Got None. (See /config/configuration.yaml, line 40). 

my configuration.yaml

homeassistant:
  auth_providers:
    - type: homeassistant
    - type: trusted_networks
      trusted_networks:
        - 192.168.1.XXX
      trusted_users:
        - 192.168.1.XXX: <user-id>
      allow_bypass_login: true

where 192.168.1.XXX is the ip of my nest hub

any suggestions on how to fix this would be appreciated,

thanks!

Could it be you’re using the wrong user-id, as shown here?

no, i am using the id you get after clicking the user here

You need to define a network range of /32 for a single IP address, as you should define a network.

      trusted_networks:
        - 192.168.1.XXX/32

Same issue here: with no trusted_users set in the configuration.yaml, HA loads properly.

 homeassistant:
  auth_providers:
    - type: homeassistant
    - type: trusted_networks
      trusted_networks:
        - 192.168.1.0/24
      allow_bypass_login: true

But I would like to get a Smart-Mirror (setup on RPi5) entering automatically on my dashboard so thought of using the “trusted_users”…

As soon as I add trusted_users, HA collapses completely and my only way to get back in HA is to…restore the whole thing from a backup (fortunately last one was 2 days ago…) !:

homeassistant:
  auth_providers:
    - type: homeassistant
    - type: trusted_networks
      trusted_networks:
        - 192.168.1.0/24
      trusted_users:
        192.168.1.134: Mirror
        192.168.1.0/24:
          - Mirror
          - Tablet3user
      allow_bypass_login: true

Checking the configuration in the Developper Tools does provide any error, but when I restart HA: it brings a total disaster:

EDIT: OK found the cause !!!: it must be the ID and not the user name !!!

  trusted_users:
    192.168.1.134: 6a932634458645c4aa6d376c923a0764
  allow_bypass_login: true