Explorar el Código

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 hace 1 año
padre
commit
c2fd0e715b
Se han modificado 1 ficheros con 7 adiciones y 7 borrados
  1. 7 7
      custom_components/tuya_local/devices/aubess_1gang_switch.yaml

+ 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