Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZeroDivisionError Home Assistant Cloud together with Google Assistant #15295

Closed
bartnaaijkens opened this issue Jul 4, 2018 · 1 comment
Closed

Comments

@bartnaaijkens
Copy link

Home Assistant release with the issue:
0.72.1

Last working Home Assistant release (if known): not known

Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io supervisor 113 on RPI3

Component/platform:
Home Assistant Cloud with Google Assistant https://www.home-assistant.io/components/cloud/

Description of problem:
Asking Google Assistant "Which lights are switched on" gives an "Unknown error occured with 5 devices".

Switching the lights (Ikea Tradfri connected via Deconz/Zigbee) on and off via Google Assistant works perfect.

Looking at the log a ZeroDivisionError occurs in dividing by color_temperature_mired_to_kelvin. See the logs

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

cloud:
  google_actions:
    filter:
      include_entities:
        - light.kitchen__side
        - light.living_room__corner_table
        - light.living_room__couch
        - light.living_room__rack
        - media_player.mibox3

Traceback (if applicable):

2018-07-04 18:44:54 ERROR (MainThread) [homeassistant.components.google_assistant.smart_home] Unexpected error
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/components/google_assistant/smart_home.py", line 217, 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 274, in async_devices_query
    devices[devid] = _GoogleEntity(hass, config, state).query_serialize()
  File "/usr/lib/python3.6/site-packages/homeassistant/components/google_assistant/smart_home.py", line 158, in query_serialize
    deep_update(attrs, trt.query_attributes())
  File "/usr/lib/python3.6/site-packages/homeassistant/components/google_assistant/trait.py", line 322, in query_attributes
    color_util.color_temperature_mired_to_kelvin(temp)
  File "/usr/lib/python3.6/site-packages/homeassistant/util/color.py", line 478, in color_temperature_mired_to_kelvin
    return math.floor(1000000 / mired_temperature)
ZeroDivisionError: division by zero
2018-07-04 18:44:54 ERROR (MainThread) [homeassistant.components.google_assistant.smart_home] Error handling message {'inputs': [{'intent': 'action.devices.QUERY', 'payload': {'devices': [{'id': 'light.living_room__corner_table'}, {'id': 'light.living_room'}, {'id': 'light.kitchen__side'}, {'id': 'light.living_room__rack'}, {'id': 'light.living_room__couch'}]}}], 'requestId': '3520892939356097534'}: {'errorCode': 'unknownError'}

Additional information:

@bartnaaijkens
Copy link
Author

Found another issue like this: #13381

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant