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

feat (ledkia_fan_light): add additional entities

There seem to be some minor variations of this, so new entities are
added as hidden if unavailable.

- Scene and Light type from issue #4586
- Sound (beep) from PR #4675 by @ankon
Jason Rumney 2 дней назад
Родитель
Сommit
95f537261e
1 измененных файлов с 65 добавлено и 5 удалено
  1. 65 5
      custom_components/tuya_local/devices/ledkia_fan_light.yaml

+ 65 - 5
custom_components/tuya_local/devices/ledkia_fan_light.yaml

@@ -29,10 +29,14 @@ entities:
         name: switch
         name: switch
       - id: 21
       - id: 21
         type: string
         type: string
-        name: color_mode
+        name: effect
         mapping:
         mapping:
           - dps_val: white
           - dps_val: white
-            value: color_temp
+            value: "off"
+          - dps_val: scene
+            value: Scene
+          - value: "off"
+            hidden: true
       - id: 22
       - id: 22
         type: integer
         type: integer
         name: brightness
         name: brightness
@@ -51,14 +55,21 @@ entities:
             target_range:
             target_range:
               min: 2700
               min: 2700
               max: 6500
               max: 6500
-      - id: 59
-        type: string
-        name: light_type
+  - entity: text
+    translation_key: scene
+    category: config
+    hidden: true
+    dps:
+      - id: 25
+        type: hex
         optional: true
         optional: true
+        name: value
+
   - entity: number
   - entity: number
     name: Minimum brightness
     name: Minimum brightness
     icon: "mdi:brightness-6"
     icon: "mdi:brightness-6"
     category: config
     category: config
+    hidden: unavailable
     dps:
     dps:
       - id: 58
       - id: 58
         type: integer
         type: integer
@@ -70,6 +81,38 @@ entities:
           max: 1000
           max: 1000
         mapping:
         mapping:
           - scale: 10
           - scale: 10
+      - id: 58
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: select
+    name: Light type
+    category: config
+    hidden: unavailable
+    dps:
+      - id: 59
+        type: string
+        name: option
+        optional: true
+        mapping:
+          - dps_val: led
+            value: LED
+          - dps_val: incandescent
+            value: Incandescent
+          - dps_val: halogen
+            value: Halogen
+      - id: 59
+        type: string
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: number
   - entity: number
     name: Fan timer
     name: Fan timer
     class: duration
     class: duration
@@ -83,3 +126,20 @@ entities:
           min: 0
           min: 0
           max: 540
           max: 540
         unit: min
         unit: min
+  - entity: switch
+    translation_key: sound
+    category: config
+    hidden: true
+    dps:
+      - id: 66
+        type: boolean
+        optional: true
+        name: switch
+      - id: 66
+        type: boolean
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true