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

Add an RGBCW lightbulb.

Based on Lepro RGBCW bulbs from Amazon.
Jason Rumney 3 лет назад
Родитель
Сommit
2c83b90a6a
1 измененных файлов с 75 добавлено и 0 удалено
  1. 75 0
      custom_components/tuya_local/devices/rgbcw_lightbulb.yaml

+ 75 - 0
custom_components/tuya_local/devices/rgbcw_lightbulb.yaml

@@ -0,0 +1,75 @@
+name: RGBCW Light bulb
+product:
+  - id: aok3caeleulg1neh
+primary_entity:
+  entity: light
+  dps:
+    - id: 20
+      type: boolean
+      name: switch
+    - id: 21
+      type: string
+      name: color_mode
+      mapping:
+        - dps_val: white
+          value: color_temp
+        - dps_val: colour
+          value: rgbw
+        - dps_val: scene
+          value: colorloop
+        - dps_val: music
+          value: random
+    - id: 22
+      name: brightness
+      type: integer
+      range:
+        min: 10
+        max: 1000
+      mapping:
+        - scale: 3.92
+    - id: 23
+      name: color_temp
+      type: integer
+      range:
+        min: 0
+        max: 1000
+      mapping:
+        - invert: true
+    - id: 24
+      name: rgbhsv
+      type: hex
+      format:
+        - name: h
+          bytes: 2
+          range:
+            min: 0
+            max: 360
+        - name: s
+          bytes: 2
+          range:
+            min: 0
+            max: 1000
+        - name: v
+          bytes: 2
+          range:
+            min: 0
+            max: 1000
+    - id: 25
+      name: scene_data
+      type: hex
+secondary_entities:
+  - entity: number
+    name: Timer
+    category: config
+    icon: "mdi:timer"
+    dps:
+      - id: 26
+        name: value
+        type: integer
+        range:
+          min: 0
+          max: 86400
+        unit: min
+        mapping:
+          - scale: 60
+            step: 60