Răsfoiți Sursa

Aubess 1gang switch: ensure select has options at startup

When there is no data from the device yet, select for initial state was
evaluated as having no values.
Default to having word values, so the initialisation picks up the options.

Issue #3112
Jason Rumney 11 luni în urmă
părinte
comite
c2fd0e715b

+ 7 - 7
custom_components/tuya_local/devices/aubess_1gang_switch.yaml

@@ -77,13 +77,13 @@ entities:
         type: string
         name: word_values
         mapping:
-          - dps_val: "on"
-            value: true
-          - dps_val: "off"
-            value: true
-          - dps_val: memory
-            value: true
-          - value: false
+          - dps_val: "0"
+            value: false
+          - dps_val: "1"
+            value: false
+          - dps_val: "2"
+            value: false
+          - value: true
   - entity: sensor
     name: Energy
     category: diagnostic