ソースを参照

Ledvance LED panel: don't use explicit color_modes.

Lights were defined with single value color_mode dps, but actual dp can
take other values also. This may cause unexpected behaviour and definitely
will cause errors in the log.

Since single function lights color mode can be detected based on which
dps are defined, rename it out of the way and let the auto detection work.

Further changes require more info on the dps, there is some info on
#2683, but so far only enough to enable separate switching of main and
backlight.

PR #2728
Jason Rumney 1 年間 前
コミット
9e62806daf

+ 2 - 8
custom_components/tuya_local/devices/ledvance_smart_plabl100x25b.yaml

@@ -12,10 +12,7 @@ entities:
         name: switch
         name: switch
       - id: 21
       - id: 21
         type: string
         type: string
-        name: color_mode
-        mapping:
-          - dps_val: white
-            value: color_temp
+        name: work_mode
       - id: 22
       - id: 22
         name: brightness
         name: brightness
         type: integer
         type: integer
@@ -40,10 +37,7 @@ entities:
         name: switch
         name: switch
       - id: 21
       - id: 21
         type: string
         type: string
-        name: color_mode
-        mapping:
-          - dps_val: colour
-            value: hs
+        name: work_mode
       - id: 24
       - id: 24
         type: hex
         type: hex
         name: rgbhsv
         name: rgbhsv