Core: Trying to relink google_assistant app trows error

Created on 16 Mar 2018  路  8Comments  路  Source: home-assistant/core

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version):
HASSIO 0.65.5

Python release (python3 --version):

Component/platform:
google_asistant

Description of problem:
When trying to link app to google_assistant errors appears in hassio logs
and in Google Home APP

Something went wrong. try again

Expected:
APp and google_assistant link and control of hassio trough Google Home

Problem-relevant configuration.yaml entries and steps to reproduce:

google_assistant.yaml
project_id: hassgoogass
client_id: !secret gass_client_id
access_token: !secret gass_access_tk
agent_user_id: [email protected]
api_key: !secret gass_api
exposed_domains:
  - light
  - climate
  - group
  - cover
entity_config:
  switch.brlnk_parents:
    expose: true
  switch.brlnk_extra:
    expose: true
  switch.laeti:
    expose: true
  switch.cabinet_lights:
    expose: true
  switch.window_lights:
    expose: true
  input_boolean.guest_mode:
    name: Guest Mode
    expose: true
  script.bath_heat_on:
    expose: true
    name: Shower Time
  script.launch_roomba:
    name: Roomba
    expose: true
  switch.heater_power:
    name: Bathroom Heater
    expose: true
  script.button_arm_alarm:
    name: Going Away
    expose: true
  media_player.samsungtv:
    name: Samsung TV
    expose: true


    1. 2.
  1. 3.

Traceback (if applicable):

Unexpected error
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/components/google_assistant/smart_home.py", line 205, in _process
result = await handler(hass, config, inputs[0].get('payload'))
  File "/usr/lib/python3.6/site-packages/homeassistant/components/google_assistant/smart_home.py", line 232, in async_devices_sync
serialized = entity.sync_serialize()
  File "/usr/lib/python3.6/site-packages/homeassistant/components/google_assistant/smart_home.py", line 128, in sync_serialize
device['attributes'].update(trt.sync_attributes())
  File "/usr/lib/python3.6/site-packages/homeassistant/components/google_assistant/trait.py", line 310, in sync_attributes
attrs.get(light.ATTR_MIN_MIREDS)),
  File "/usr/lib/python3.6/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'
Log Details (ERROR)
Fri Mar 16 2018 15:00:09 GMT+0100 (Paris, Madrid)

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

Additional info:

Most helpful comment

Should be fixed in https://github.com/home-assistant/home-assistant/pull/13358.

Report back if this is still a problem in 0.66.

All 8 comments

This might have to do with having an input_boolean in your config. For me expose_by_default: true was causing troubles until i hid my input_boolean. After this syncing works fine. You can disable it by using entity_config. I think the errors above also disappear after hiding the input_boolean.

I've got the same problem. In previous versions (and maybe less devices) it worked perfectly.
Although I don't use any "input_boolean" in my configuration (only input_number).
I'll test which device is causing this and then report back.

Edit 1:
It seems that the bug with the input of booleans for GAssistant was already fixed in #13220.

For me the cause of the issue is a Philips Hue light in my hass configuration which is currently not plugged in making it unavailable (in hass). After plugging the light back in (and having any device available again), Google Assistant will link again. (My guess is that the google assistant component tries to find out the current color temperature of the lamp, but as the light is offline, hass can't get the color temperature and can not link with Google Assistant.)

For some reason the same error now also pops up when I turn off a light using GAssistant (not when turning on) but the light turns off.

I can confirm the same issue, one lamp was unreachable that caused the sync to be misfunctionning.
Setting it to expose:false in the entity_config part allowed me to link / sync properly afterwards.

+1 ; expose:false on the disconnected light works as a workaround.

Should be fixed in https://github.com/home-assistant/home-assistant/pull/13358.

Report back if this is still a problem in 0.66.

https://hastebin.com/quxagecaqa.js
I'm getting this on Home Assistant 0.65.6 when trying to turn off an rgb // colortemp light.
The lamp still turns off but GAssistant says there was an error.
Turning on the light works without any problem and displays no errors at all.
-> Moved to #13381

@TheJulianJES please open a new issue. Your error is not exactly the same, so it's better to make a new issue.

Was this page helpful?
0 / 5 - 0 ratings