core: Error in deconz when controlling lights

The problem

Since a few weeks, when trying to control lights through deconz some of them stopped responding or where showcasing a false state and becoming unresponsive. Meaning, that toggling lights from the dashboard didn’t result in anything but a lot of error messages. For some lights, the toggle is turned on, but after a few seconds it turns off again. Sometimes the light actually turns on, other times it’s unresponsive.

What is version of Home Assistant Core has the issue?

core-2021.10.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Deconz

Link to integration documentation on our website

https://www.home-assistant.io/integrations/deconz/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant
Source: components/deconz/light.py:163
First occurred: 18 oktober 2021 21:04:10 (817 occurrences)
Last logged: 19:35:42

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pydeconz/gateway.py", line 183, in session_handler
    self.event_handler(self.websocket.data)  # type: ignore
  File "/usr/local/lib/python3.9/site-packages/pydeconz/gateway.py", line 205, in event_handler
    device_class.process_raw({device_id: event})
  File "/usr/local/lib/python3.9/site-packages/pydeconz/api.py", line 40, in process_raw
    obj.update(raw_item)
  File "/usr/local/lib/python3.9/site-packages/pydeconz/api.py", line 128, in update
    signal_update_callback()
  File "/usr/src/homeassistant/homeassistant/components/deconz/deconz_device.py", line 85, in async_update_callback
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 491, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 878, in state_attributes
    data.update(self._light_internal_convert_color(color_mode))
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 805, in _light_internal_convert_color
    if color_mode == COLOR_MODE_HS and self.hs_color:
  File "/usr/src/homeassistant/homeassistant/components/deconz/light.py", line 163, in hs_color
    return (self._device.hue / 65535 * 360, self._device.saturation / 255 * 100)
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'


### Additional information

First, this error only happened with one light and didn't cause too much trouble, now it happens more than 200 times a day with multiple lights.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 23 (10 by maintainers)

Most upvoted comments

Ping @megawubs there is nothing I can do without debug logs to guide me.

I’ll try and see if I can provide some debug logs tomorrow. Forgive me for being silent and not providing the required info sooner. I’ve been sick and lying in bed these last couple of days.

Of course, my bad. I’m running ZHA with a similar issue, and I recently switched to ZHA because of this issue with Deconz. Thanks anyway.