Преглед изворни кода

feat(multi_channel_switch): rename from seven channel to support 8

- support an optional 8th channel
- support optional light mode select

PR #4824 by @Bt338
Jason Rumney пре 2 месеци
родитељ
комит
9f36ed6ee4
1 измењених фајлова са 68 додато и 1 уклоњено
  1. 68 1
      custom_components/tuya_local/devices/multi_channel_switch.yaml

+ 68 - 1
custom_components/tuya_local/devices/seven_channel_switch.yaml → custom_components/tuya_local/devices/multi_channel_switch.yaml

@@ -1,9 +1,13 @@
-name: Seven channel switch
+name: Multi channel switch
+legacy_type: seven_channel_switch
 products:
   - id: 7w1gnppunpyev9tj
     manufacturer: Inna
     model: AUT000014
     name: Underfloor heating controller
+  - id: aaa2vqyazpodpqhb
+    model: "8112"
+    name: Underfloor heating controller
 entities:
   - entity: switch
     translation_key: switch_x
@@ -61,6 +65,24 @@ entities:
       - id: 7
         type: boolean
         name: switch
+  - entity: switch
+    translation_key: switch_x
+    translation_placeholders:
+      x: "8"
+    hidden: unavailable
+    dps:
+      - id: 8
+        type: boolean
+        optional: true
+        name: switch
+      - id: 8
+        type: boolean
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: time
     category: config
     translation_key: timer_x
@@ -145,6 +167,28 @@ entities:
         range:
           min: 0
           max: 86400
+  - entity: time
+    category: config
+    translation_key: timer_x
+    translation_placeholders:
+      x: "8"
+    hidden: unavailable
+    dps:
+      - id: 16
+        type: integer
+        optional: true
+        name: second
+        range:
+          min: 0
+          max: 86400
+      - id: 16
+        type: integer
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
   - entity: select
     translation_key: initial_state
     category: config
@@ -159,3 +203,26 @@ entities:
             value: "on"
           - dps_val: memory
             value: memory
+  - entity: select
+    translation_key: light_mode
+    category: config
+    hidden: unavailable
+    dps:
+      - id: 40
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: relay
+            value: state
+          - dps_val: pos
+            value: locator
+          - dps_val: none
+            value: "off"
+      - id: 40
+        type: string
+        optional: true
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true