فهرست منبع

feat (simple_dual_switch_timer_v2): support Deta device

Add optional entities for child lock, initial state, light mode and inching.

As they are optional, they should not affect other devices without them, but
they improve matching for devices with them, as otherwise there tend to be
more dps matched on other single switch configs, as the second switch and
timer only account for 2 dps, while these account for up to 4.

Discussion #4233
Jason Rumney 2 ماه پیش
والد
کامیت
d2cbbe4026
1فایلهای تغییر یافته به همراه74 افزوده شده و 32 حذف شده
  1. 74 32
      custom_components/tuya_local/devices/simple_dual_switch_timer_v2.yaml

+ 74 - 32
custom_components/tuya_local/devices/simple_dual_switch_timer_v2.yaml

@@ -3,6 +3,9 @@ products:
   - id: 7c35xxu0foeqpdka
     manufacturer: BlitzWolf
     model: BW-SS5
+  - id: grnoiynjhh18aa15
+    manufacturer: Deta
+    model: "6922HA Series 3"
 entities:
   - entity: switch
     translation_key: switch_x
@@ -44,41 +47,80 @@ entities:
         range:
           min: 0
           max: 86400
-  - entity: number
-    class: duration
-    translation_key: timer_x
-    translation_placeholders:
-      x: "1"
-    # 2025-07-20
-    deprecated: time.timer_1
+  - entity: select
+    translation_key: initial_state
     category: config
+    hidden: unavailable
     dps:
-      - id: 9
-        type: integer
-        name: value
-        range:
-          min: 0
-          max: 86400
+      - id: 38
+        type: string
+        optional: true
+        name: option
         mapping:
-          - scale: 60
-            step: 60
-        unit: min
-  - entity: number
-    class: duration
-    translation_key: timer_x
-    translation_placeholders:
-      x: "2"
-    # 2025-07-20
-    deprecated: time.timer_2
+          - dps_val: "off"
+            value: "off"
+          - dps_val: "on"
+            value: "on"
+          - dps_val: memory
+            value: memory
+      - id: 38
+        type: string
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: select
+    name: light_mode
     category: config
+    hidden: unavailable
     dps:
-      - id: 10
-        type: integer
-        name: value
-        range:
-          min: 0
-          max: 86400
+      - id: 40
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: relay
+            value: state
+          - dps_val: pos
+            value: locator
+          - dps_val: none
+            value: "off"
+          - dps_val: "on"
+            value: "on"
+      - id: 40
+        type: string
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    hidden: unavailable
+    dps:
+      - id: 41
+        type: boolean
+        optional: true
+        name: lock
+      - id: 41
+        type: boolean
+        optional: true
+        name: available
         mapping:
-          - scale: 60
-            step: 60
-        unit: min
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: text
+    name: Inching
+    category: config
+    icon: "mdi:toggle-switch"
+    hidden: true
+    dps:
+      - id: 44
+        type: string
+        optional: true
+        name: value