소스 검색

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 1 년 전
부모
커밋
c2fd0e715b
1개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  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