Просмотр исходного кода

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 2 лет назад
Родитель
Сommit
04bf657dac
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      custom_components/tuya_local/devices/chanfok_fan_light.yaml

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

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