Ver Fonte

Chanfok fan light: change control_data type, add work_mode

- control_data was marked as hex, but may be base64 based on experience.
Because this is not actually used, it can only cause problems to decode it
(incorrectly), so mark it as string to llow either type to work.
- add optional work_mode, even though it can basically only be white with
no color_data, scene_data or music_data dps.

PR #2068
Jason Rumney há 2 anos atrás
pai
commit
04bf657dac

+ 5 - 1
custom_components/tuya_local/devices/chanfok_fan_light.yaml

@@ -35,6 +35,10 @@ secondary_entities:
       - id: 20
       - id: 20
         type: boolean
         type: boolean
         name: switch
         name: switch
+      - id: 21
+        name: work_mode
+        type: string
+        optional: true
       - id: 22
       - id: 22
         name: brightness
         name: brightness
         type: integer
         type: integer
@@ -53,7 +57,7 @@ secondary_entities:
               max: 6500
               max: 6500
       - id: 28
       - id: 28
         name: control_data
         name: control_data
-        type: hex
+        type: string
         optional: true
         optional: true
   - entity: switch
   - entity: switch
     name: Beep
     name: Beep