sbidy / wiz_light

A WiZ Light integration for Home Assistant
MIT License
341 stars 68 forks source link

"Cannot evaluate color" #223

Closed tmtechxyz closed 2 years ago

tmtechxyz commented 2 years ago

I'm using 2 WiZ single color ST19 filament style bulbs. Everything is technically working fine on them, but getting a constant error saying "Cannot evaluate color" in the logs.

Here's what's showing up:

Logger: custom_components.wiz_light.light
Source: custom_components/wiz_light/light.py:344
Integration: WiZ Light
First occurred: 3:18:32 PM (10 occurrences)
Last logged: 3:19:32 PM
Cannot evaluate color

Traceback (most recent call last):
  File "/config/custom_components/wiz_light/light.py", line 344, in update_color
    self._hscolor = convertHSfromRGBCW(rgb, warmwhite)
  File "/usr/local/lib/python3.9/site-packages/pywizlight/rgbcw.py", line 238, in convertHSfromRGBCW
    raise ValueError("Invalid RGB or CW values.")
ValueError: Invalid RGB or CW values.

Of course it's getting invalid values for RGB and CW, as they're single color bulbs. Should the integration be able to determine and not look for these values?

Again, everything is technically working, so not an urgent issue. But these errors are showing hundreds of time a day if not more.

Thanks for your work on this integration though!

sbidy commented 2 years ago

Can you please check the version of the integration? It seems that you are not running the latest version.

tmtechxyz commented 2 years ago

I'm running version 0.4.5b, but after a few restarts of HA for some other programming, I haven't seen the error message for a few days now.