4
0
Эх сурвалжийг харах

Quad powerstrip with timers: add optional initial state selector

Some devices have an initial state selector on the common dp 38 Tuya
uses for this purpose. Now that we have better support for disabling
unavailable entites, make this an optional entity for those devices
that support it.

Avoids making an additional config specifically for this variant as in
PR #2853
Jason Rumney 1 жил өмнө
parent
commit
c16e9da74f

+ 27 - 0
custom_components/tuya_local/devices/quad_power_timer.yaml

@@ -3,6 +3,9 @@ products:
   - id: ckg60n4x6qakegxo
   - id: ckg60n4x6qakegxo
     manufacturer: Xystec
     manufacturer: Xystec
     model: NX-4986-919 4xUSB
     model: NX-4986-919 4xUSB
+  - id: fn2jtjtvkegj2oll
+    manufacturer: Powersav
+    model: AHR-083
 entities:
 entities:
   - entity: switch
   - entity: switch
     translation_key: outlet_x
     translation_key: outlet_x
@@ -108,3 +111,27 @@ entities:
         mapping:
         mapping:
           - scale: 60
           - scale: 60
             step: 60
             step: 60
+  - entity: select
+    translation_key: initial_state
+    category: config
+    hidden: unavailable
+    dps:
+      - id: 38
+        type: string
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+      - id: 38
+        type: string
+        name: option
+        optional: true
+        mapping:
+          - dps_val: "on"
+            value: "on"
+          - dps_val: "off"
+            value: "off"
+          - dps_val: memory
+            value: memory