Cannot create skill for Google Assistant component

With the introduction of the new Google Assistant support via Home Assistant Cloud, I’m trying to move over to this less complicated configuration, to not need to have SSL, port forwarding, Google APIs and whatnot. But I cannot get it to work.

I’m getting the “Couldn’t update the setting. Check you connection” error message in the Google Home app when trying to add the skill (hass.io device in Google Home).

I’ve had the Google Assistant integration in HASS running before, so I commented out all the google_assistant: code from the yaml, and restarted. No change. I’ve also commented out cloud: and restarted, and put it back and logged in - again no change.

Is there any way to figure out what’s hidden behind this error message?

A few questions/theories:

  1. Do the Google Home app need to be on the same network as the HASS for this configuration step to work? Seems unlikely, but I’m currently remote on 4G with the phone/device.
  2. Does the new Google Assistant require any yaml changes at all - like API keys or similar? Or is that all handled by the HA Cloud?

This is what pops up in the HASS log every time the operation fails:

2018-04-26 11:05:33 ERROR (MainThread) [homeassistant.components.google_assistant.smart_home] Unexpected error
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/google_assistant/smart_home.py”, line 195, in _process
result = await handler(hass, config, inputs[0].get(‘payload’))
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/google_assistant/smart_home.py”, line 222, in async_devices_sync
serialized = entity.sync_serialize()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/google_assistant/smart_home.py”, line 118, in sync_serialize
device[‘attributes’].update(trt.sync_attributes())
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/google_assistant/trait.py”, line 310, in sync_attributes
attrs.get(light.ATTR_MIN_MIREDS)),
File “/srv/homeassistant/lib/python3.5/site-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’
2018-04-26 11:05:33 ERROR (MainThread) [homeassistant.components.google_assistant.smart_home] Error handling message {‘requestId’: ‘370058206973618966’, ‘inputs’: [{‘intent’: ‘action.devices.SYNC’}]}: {‘errorCode’: ‘unknownError’}

So one of your light platforms is misbehaving.

Are you using a custom component for lights?
Which Home Assistant version?

Go to the states panel and find the light state that does not have the attributes min_mireds, which platform does it belong to?

Version is 0.65.4. And I think I understand what light is lacking the min_mireds - it’s because it’s unavailable. :slight_smile:

Could this be considered a bug that unavailable lights gets treated that way?

I’m going to have to check it when I get home, the breaker switch must be turned off.

Edit: And no, no custom light components.

So I’ve fixed that bug already. Home Assistant will skip unavailable lights for Google Assistant. Probably fixed in version 0.65.5 or maybe 66

1 Like

Cool! Then I have a workaround (get the light running before doing the sync) and a fix (bug fixed in HA).

I’ll validate when I’ll get home. Thanks!

1 Like