Parcourir la source

Add support for Calex aroma diffuser

Issue #1164
Jason Rumney il y a 1 an
Parent
commit
478a8ba5a3

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -670,3 +670,4 @@ Further device support has been made with the assistance of users. Please consid
 - [carmelo42](https://github.com/carmelo42) for contributing support for Fujicool Yuzu heat pump.
 - [dkvk](https://github.com/dkvk) for contributing support for Malmbergs single and dual dimmer modules.
 - [guffy1234](https://github.com/guffy1234) for contributing support for Atorch AT4PW energy meter.
+- [larronni](https://github.com/larronni) for contributing support for Calex aroma diffuser.

+ 1 - 0
DEVICES.md

@@ -341,6 +341,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
 - Ditua DT-1522-YN aroma diffuser
 - Etersky aroma diffuser with light
 - Maxico aroma diffuser with light (cannot be differentiated automatically from Ditua above)

+ 76 - 0
custom_components/tuya_local/devices/calex_aromadiffuser.yaml

@@ -0,0 +1,76 @@
+name: Aroma diffuser
+products:
+  - id: orw9vhekocfzx78l
+    name: Calex v2.0
+primary_entity:
+  entity: switch
+  dps:
+    - id: 1
+      name: switch
+      type: boolean
+secondary_entities:
+  - entity: switch
+    name: Spray
+    dps:
+      - id: 2
+        name: switch
+        type: boolean
+        mapping:
+          - dps_val: true
+            icon: "mdi:scent"
+          - dps_val: false
+            icon: mdi:scent-off"
+  - entity: light
+    dps:
+      - id: 7
+        name: switch
+        type: boolean
+      - id: 9
+        name: color_mode
+        type: string
+        mapping:
+          - dps_val: colour
+            value: hs
+          - dps_val: colourful1
+            value: Colorful
+      - id: 10
+        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: 255
+          - name: v
+            bytes: 1
+            range:
+              min: 0
+              max: 255
+  - entity: select
+    translation_key: timer
+    category: config
+    dps:
+      - id: 4
+        name: option
+        type: string
+        mapping:
+          - dps_val: cancel
+            value: cancel
+          - dps_val: "1"
+            value: "1h"
+          - dps_val: "3"
+            value: "3h"
+          - dps_val: "6"
+            value: "6h"