Google Assistant Setup Issue - "Could not update the setting. Please check your connection"

Few days ago, I need to reconnect my Google Assistant integration.
I use Home Assistant 65.5
My configuration.yaml looks like this:

google_assistant:
  project_id: !secret assistant_project_id
  client_id: !secret assistant_client_id
  access_token: !secret assistant_access_token
  api_key: !secret assistant_api_key
  exposed_domains:
    - light

But when I try to connect my Google Assistant project it returns the “Could not update settings. Please check your…”

Also I get this two error Logs in Home Assistant:

Log Details (ERROR)
Thu Mar 22 2018 13:21:24 GMT+0100 (Mitteleuropäische Zeit)

    Unexpected error
    Traceback (most recent call last):
      File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/google_assistant/smart_home.py", line 205, in _process
        result = await handler(hass, config, inputs[0].get('payload'))
      File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/google_assistant/smart_home.py", line 232, in async_devices_sync
        serialized = entity.sync_serialize()
      File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/google_assistant/smart_home.py", line 128, in sync_serialize
        device['attributes'].update(trt.sync_attributes())
      File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/google_assistant/trait.py", line 310, in sync_attributes
        attrs.get(light.ATTR_MIN_MIREDS)),
      File "/usr/local/lib/python3.5/dist-packages/homeassistant/util/color.py", line 443, in color_temperature_mired_to_kelvin
        return math.floor(1000000 / mired_temperature)
    TypeError: unsupported operand type(s) for /: 'int' and 'NoneType'


Log Details (ERROR)
Thu Mar 22 2018 13:21:24 GMT+0100 (Mitteleuropäische Zeit)

Error handling message {'requestId': '18002153049767507791', 'inputs': [{'intent': 'action.devices.SYNC'}]}: {'errorCode': 'unknownError'}

The strange thing is, if I change my configuration.yaml to this…:

google_assistant:
  project_id: !secret assistant_project_id
  client_id: !secret assistant_client_id
  access_token: !secret assistant_access_token
  api_key: !secret assistant_api_key
  expose_by_default: false
  exposed_domains:
    - light
  entity_config:
    light.deckenlampe_herd:
      expose: true

…it syncs and will show me the deckenlampe_herd as light.
But if I try to add more ligts with this mehtod it won’t sync and shows me the two error messages from above in HA again :frowning:
I have no clue what I can do here anymore to fix this behaviour :-/

…::edit::…
Ok, seems that it should to be fixed with this commit: https://github.com/home-assistant/home-assistant/pull/13358

Yes!
With 0.65.6 I can for the first time add home assistant from the google home app.

On HA version 0.65.6. Google Assistant component has fully support input_boolean to be turn on/off

Thank you very much.

The only downside with the method from @balloob’s pull request 13358 is, that now all hue lamps have to be on(line) if you want to add some lights or sync your HA devices with google assistant :smiley:

Otherwise, the lights that are offline at that moment, will be removed from Google Assistant.

I had a working configuration. I wanted to include some entities, reboot Hassio, unlinked Hassio in Google Home app, and now it does not connect anymore, giving same error as in thread title

Don’t know what to do

I found out the cause, one entity_id in configuration under Google_actions was misspelled.

I have had this error now for 2 days.
the implementation worked previously.
Never change a winning team …

I have recreated the google actions now multiple times.
Deleted an created new projects.
(all the deleted projects still show up when I try to link the account in GHome, should they not disappear?
But constantly get stuck at this error. “Could not update the setting. Please check your connection”

any ideas on where to start troubleshooting?
HA 0.77.3 in Docker on Unraid

It works now!!

I still had these style customization in my file:

light.bathroom_light:
  google_assistant: true
  google_assistant_name: 'Bathroom Light'   

once I moved them to this in the Google Assistant config it worked…

light.bathroom_light:
  name: 'Bathroom Light' 
  room: bathroom
  expose: true

That’s interesting. I always had these in my google assistant yaml file and never had any problems. Glad you worked it out.

Maybe it was just a coincidence and GH just started working again

After few days of trying this to work again, finaly managed to get it done!
I switched from HASS.IO on raspberry pi to intel NUC, running Linux 18.04 and homeassistant in Docker.
I have also set up Nginx reverse proxy in docker.
I had google assistant working in HASS.IO RP3, but it stopped working in new setup.
I tryed recreating GA but keep geting the same error :Could not update settings…
What I found out is removing this line from configuration.yaml
api_key: !secret api_key
So my configuration.yaml looks like this:

google_assistant:
  project_id: !secret project_id
  client_id: !secret client_id
  access_token: !secret access_token

And setting link’s like this in developer console
Under action set link like this:
https://subdomain.duckdns.org/api/google_assistant

And under account linking, client information should look like this:
https://subdomain.duckdns.org/api/google_assistant/auth

Just replace subdomain.duckdns.org with the link you are accessing HA with.

I had links from HASS.IO setup like this:
https://[YOUR HOME ASSISTANT URL:PORT]/api/google_assistant?api_password=[YOUR API PASSWORD]
That was the only problem I had actualy, removing api password resolved it for me. Hope this will help.

I don’t know if this will work for anyone else but mine started working after i went into the project and filled out the required “Directory Information” fields.

Sadly didn’t work for me :frowning:

I think I’ve tried every suggestion in this thread. Maybe I’m missing something, but I still get the same error message after entering my HA username/password. I’ve tried a new application, new gmail account, new phone, settings changes, updating directory information, etc.
I’m running home assistant through docker on a ubuntu server.

My app config looks like this:

Create Smart Home action: https://xxxx.duckdns.org:8123/api/google_assistant

Relevant yaml:
google_assistant:
project_id: homeassistant-XXXX
api_key: AIzaXXXXX…
expose_by_default: false

What am I missing?

What are my other options? Paying the $5/month to do it through the home assistant connection? Buy a Samsung SmartThings hub so I can get connected through that to Google Assistant?
I don’t like to give up on things, but this worked for a year and then just broke and it is frustrating…

Just as an info, since this took my Google Assistant connection offline for weeks after updating to HASS >= 0.80:

For connecting Google Home to Homeassistant you need a valid AND current certificate e.g. from Lets Encrypt. I was not able to connect the Google Home app to my Home Assistant server and I was not able to figure out why. Turns out, that my expired Lets Encrypt certificate was the reason, since I did not bother to update it since a couple of months.

Maybe someone can add this information to the wiki and save someone else from the oddysee I’ve endured.

It’s pretty clear on Google and in the HA docs you need to use a Https:// address for the endpoint. How did you think you would get that without an SSL certificate? This isn’t hidden information - I guess you just didn’t understand it. The Wiki and Docs spell this out.

If you really think it’s not clear enough, you can feel free on the Docs page, top right corner, to click on edit this page and make your suggested changes. The pull request will then be reviewed by the devs and accepted if it’s not clear.

Please read slowly what I’ve wrote. I was using a certificate and I was using a HTTPS endpoint. Only that the certificate was expired.

Thats a very different thing to the one you described. HTTPS and the encryption work also in this case, you are just not protected from MITM.

Is that actually how it is written in your config yaml, or do you have your spacing right?

Yes, project_id and below are indented. Sorry, poor representation of proper spacing.

And are you able to access your hass domain from the server internal network e.g. https://your_domain.duckdns.org:8123?