Explorar o código

Use correct color util function to convert from RGB.

RGB is capitalised in the util functions, unlike others like hs, hsv, xy.

Discussion #948, where a user is trying to get an RGB bulb without hsv info
working.  Will need to add test cases when the config is available.
Jason Rumney %!s(int64=2) %!d(string=hai) anos
pai
achega
232c743308
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      custom_components/tuya_local/light.py

+ 1 - 1
custom_components/tuya_local/light.py

@@ -195,7 +195,7 @@ class TuyaLocalLight(TuyaLocalEntity, LightEntity):
                 r = rgbhsv.get("r")
                 g = rgbhsv.get("g")
                 b = rgbhsv.get("b")
-                hs = color_util.color_rgb_to_hs(r, g, b)
+                hs = color_util.color_RGB_to_hs(r, g, b)
             return hs
 
     @property