Kaynağa Gözat

feat (devices): add support for Deta 6914HA series 3 fan controller

Issue #3622

Review of #12 and linked info shows the existing Deta fan config is
for 6914HA series 2.
Jason Rumney 4 ay önce
ebeveyn
işleme
666fe9a9d6

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1057,3 +1057,4 @@ Further device support has been made with the assistance of users. Please consid
 - [Shmob1](https://github.com/Shmob1) for assisting with support for Brilliant Smart PIR outdoor sensor.
 - [siobhanellis](https://github.com/siobhanellis) for assisting with support for Weeket KES5211TE-CE kettle.
 - [saappleg](https://github.com/saappleg) for assisting with support for MolyPet F02W pet feeder.
+- [trebic](https://github.com/trebic) for assisting with support for Deta 6914HA Series 3 fan controller.

+ 1 - 1
DEVICES.md

@@ -274,7 +274,7 @@
 - ComfortZone Powr Curve stand fan
 - Create XW-FAN-215-D ceiling fan with light (dimming and non-dimming variants)
 - Depauley WS-FPZ37-18I-EU ceiling fan with light
-- Deta fan controller
+- Deta fan controllers (6914HA Series 2 and 3)
 - Djive ARC humidifying fan
 - Dream Maker Feel DM01 fan
 - Duux Whisper Flex pedestal fan

+ 85 - 0
custom_components/tuya_local/devices/deta_6914ha_fancontroller.yaml

@@ -0,0 +1,85 @@
+name: Fan controller
+products:
+  - id: gktnt3qekgoxg0hv
+    manufacturer: Deta
+    model: 6914HA Series 3
+entities:
+  - entity: fan
+    dps:
+      - id: 3
+        type: string
+        name: speed
+        mapping:
+          - dps_val: "1"
+            value: 33
+          - dps_val: "2"
+            value: 66
+          - dps_val: "3"
+            value: 100
+      - id: 101
+        type: boolean
+        name: switch
+  - entity: light
+    dps:
+      - id: 102
+        type: boolean
+        name: switch
+  - entity: select
+    translation_key: timer
+    name: Fan timer
+    category: config
+    dps:
+      - id: 104
+        type: string
+        name: option
+        mapping:
+          - dps_val: "1"
+            value: cancel
+          - dps_val: "2"
+            value: "1h"
+          - dps_val: "3"
+            value: "2h"
+          - dps_val: "4"
+            value: "4h"
+          - dps_val: "5"
+            value: "8h"
+  - entity: select
+    translation_key: timer
+    name: Light timer
+    category: config
+    dps:
+      - id: 105
+        type: string
+        name: option
+        mapping:
+          - dps_val: "1"
+            value: cancel
+          - dps_val: "2"
+            value: "1h"
+          - dps_val: "3"
+            value: "2h"
+          - dps_val: "4"
+            value: "4h"
+          - dps_val: "5"
+            value: "8h"
+  - entity: switch
+    name: Master
+    category: config
+    dps:
+      - id: 103
+        type: boolean
+        name: switch
+  - entity: select
+    translation_key: light_mode
+    category: config
+    dps:
+      - id: 12
+        type: string
+        name: option
+        mapping:
+          - dps_val: none
+            value: "off"
+          - dps_val: relay
+            value: state
+          - dps_val: pos
+            value: locator

+ 50 - 10
custom_components/tuya_local/devices/deta_fan.yaml

@@ -1,4 +1,8 @@
-name: Deta fan controller
+name: Fan controller
+# products:
+#   - id: UNKNOWN
+#     manufacturer: Deta
+#     model 6914HA Series 2
 entities:
   - entity: fan
     dps:
@@ -6,22 +10,58 @@ entities:
         type: boolean
         name: switch
       - id: 3
-        type: integer
+        type: string
         name: speed
-        range:
-          min: 1
-          max: 3
-      - id: 102
-        type: integer
-        name: timer
+        mapping:
+          - dps_val: "1"
+            value: 33
+          - dps_val: "2"
+            value: 66
+          - dps_val: "3"
+            value: 100
   - entity: light
     dps:
       - id: 9
         type: boolean
         name: switch
+  - entity: select
+    translation_key: timer
+    name: Fan timer
+    category: config
+    dps:
+      - id: 102
+        type: string
+        name: option
+        mapping:
+          - dps_val: "1"
+            value: cancel
+          - dps_val: "2"
+            value: "1h"
+          - dps_val: "3"
+            value: "2h"
+          - dps_val: "4"
+            value: "4h"
+          - dps_val: "5"
+            value: "8h"
+  - entity: select
+    translation_key: timer
+    name: Light timer
+    category: config
+    dps:
       - id: 103
-        type: integer
-        name: timer
+        type: string
+        name: option
+        mapping:
+          - dps_val: "1"
+            value: cancel
+          - dps_val: "2"
+            value: "1h"
+          - dps_val: "3"
+            value: "2h"
+          - dps_val: "4"
+            value: "4h"
+          - dps_val: "5"
+            value: "8h"
   - entity: switch
     name: Master
     category: config