Quellcode durchsuchen

feat(simple_eight_switch): add Melery branded product

- add optional initial_state and light_mode selects
Although this makes it no longer "simple", it is preferable to adding
a new config just for these minor differences.

Issue #5979
Jason Rumney vor 18 Stunden
Ursprung
Commit
72c9c72dff
1 geänderte Dateien mit 51 neuen und 0 gelöschten Zeilen
  1. 51 0
      custom_components/tuya_local/devices/simple_eight_switch.yaml

+ 51 - 0
custom_components/tuya_local/devices/simple_eight_switch.yaml

@@ -1,4 +1,7 @@
 name: Simple eight switch
+products:
+  - id: np8h8vfhuyceewnq
+    manufacturer: Melery
 entities:
   - entity: switch
     translation_key: switch_x
@@ -64,3 +67,51 @@ entities:
       - id: 102
         name: switch
         type: boolean
+  - entity: select
+    translation_key: initial_state
+    hidden: unavailable
+    category: config
+    dps:
+      - id: 14
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: "off"
+            value: "off"
+          - dps_val: memory
+            value: memory
+          - dps_val: "on"
+            value: "on"
+      - id: 14
+        type: string
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: select
+    translation_key: light_mode
+    hidden: unavailable
+    category: config
+    dps:
+      - id: 15
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: "none"
+            value: "off"
+          - dps_val: relay
+            value: state
+          - dps_val: pos
+            value: locator
+      - id: 15
+        type: string
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true