Ver Fonte

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 há 1 ano atrás
pai
commit
c16e9da74f
1 ficheiros alterados com 27 adições e 0 exclusões
  1. 27 0
      custom_components/tuya_local/devices/quad_power_timer.yaml

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

@@ -3,6 +3,9 @@ products:
   - id: ckg60n4x6qakegxo
     manufacturer: Xystec
     model: NX-4986-919 4xUSB
+  - id: fn2jtjtvkegj2oll
+    manufacturer: Powersav
+    model: AHR-083
 entities:
   - entity: switch
     translation_key: outlet_x
@@ -108,3 +111,27 @@ entities:
         mapping:
           - scale: 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