ソースを参照

Add support for Delixing KCL-M1802A-M aroma diffuser

Issue #2756
Jason Rumney 1 年間 前
コミット
d0f1696960

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -819,3 +819,4 @@ Further device support has been made with the assistance of users. Please consid
 - [salbr](https://github.com/salbr) for contributing support for Wenzhi WZ-M100-W presence sensor.
 - [DLV111](https://github.com/DLV111) for contributing product details for Arlec downlight matching RGBCW lightbulb.
 - [mikita-liaukovich-epam](https://github.com/mikita-liaukovich-epam) for contributing support for Clofte Duo 400 humidifier.
+- [tal6203](https://github.com/tal6203) for assisting with support for Delixing aroma diffuser.

+ 1 - 0
DEVICES.md

@@ -406,6 +406,7 @@
 - Asakuki aroma diffuser with light (newer devices seem to require the Ditua config below)
 - Cadance ultrasonic aroma diffuser with light and music playback
 - Calex V2 aroma diffuser
+- Delixing KCL-1802A-M aroma diffuser
 - Ditua DT-1522-YN aroma diffuser
 - Etersky aroma diffuser with light
 - Maxico aroma diffuser with light (cannot be differentiated automatically from Ditua above)

+ 139 - 0
custom_components/tuya_local/devices/kcl_m1803a_diffuser.yaml

@@ -0,0 +1,139 @@
+name: Aroma diffuser
+products:
+  - id: GQxEe5orh45cMgA6
+    manufacturer: Delixing
+    model: KCL-M1803A-M
+entities:
+  - entity: fan
+    dps:
+      - id: 2
+        type: string
+        name: switch
+        mapping:
+          - dps_val: "1"
+            value: false
+          - dps_val: "2"
+            value: true
+          - value: true
+      - id: 2
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: "1"
+            value: "none"
+          - dps_val: "2"
+            value: continuous
+          - dps_val: "3"
+            value: intermittent
+          - dps_val: "4"
+            value: timer
+      - id: 101
+        type: string
+        optional: true
+        name: speed
+        mapping:
+          - dps_val: "2"
+            value: 50
+          - dps_val: "1"
+            value: 100
+  - entity: sensor
+    translation_key: time_remaining
+    category: diagnostic
+    dps:
+      - id: 4
+        type: integer
+        name: sensor
+        unit: min
+  - entity: light
+    dps:
+      - id: 5
+        type: boolean
+        optional: true
+        name: switch
+        mapping:
+          - dps_val: null
+            value_redirect: mode_switch
+      - id: 6
+        type: string
+        name: mode_switch
+        mapping:
+          - dps_val: close
+            value: false
+          - dps_val: colorful
+            value: true
+          - dps_val: white
+            value: true
+            hidden: true
+          - dps_val: color
+            value: true
+            hidden: true
+      - id: 6
+        name: color_mode
+        type: string
+        mapping:
+          - dps_val: white
+            value: white
+          - dps_val: color
+            value: hs
+          - dps_val: colorful
+            value: Colorful
+          - dps_val: close
+            value: "Light off"
+      - id: 7
+        name: brightness
+        type: integer
+        range:
+          min: 0
+          max: 255
+      - id: 8
+        name: rgbhsv
+        type: hex
+        format:
+          - name: r
+            bytes: 1
+          - name: g
+            bytes: 1
+          - name: b
+            bytes: 1
+          - name: h
+            bytes: 2
+            range:
+              min: 0
+              max: 360
+          - name: s
+            bytes: 1
+            range:
+              min: 0
+              max: 100
+          - name: v
+            bytes: 1
+            range:
+              min: 0
+              max: 100
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 9
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 9
+        type: bitfield
+        name: fault_code
+  - entity: number
+    translation_key: timer
+    class: duration
+    category: config
+    dps:
+      - id: 102
+        type: integer
+        optional: true
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 360