Просмотр исходного кода

Relay switch with remote: use descriptive strings not numeric

Based on actual logs from the device, the full strings (at least "38": "off"
and "47": "button") are used for the enum types, not "0", "1", "2" as
incorrectly documented in the iot.tuya.com results.

Issue #947
Jason Rumney 2 лет назад
Родитель
Сommit
103d0769ee
1 измененных файлов с 6 добавлено и 6 удалено
  1. 6 6
      custom_components/tuya_local/devices/relay_switch_remote.yaml

+ 6 - 6
custom_components/tuya_local/devices/relay_switch_remote.yaml

@@ -50,11 +50,11 @@ secondary_entities:
         type: string
         name: option
         mapping:
-          - dps_val: "0"
+          - dps_val: "off"
             value: "Off"
-          - dps_val: "1"
+          - dps_val: "on"
             value: "On"
-          - dps_val: "2"
+          - dps_val: "memory"
             value: Last state
   - entity: select
     name: Switch type
@@ -65,11 +65,11 @@ secondary_entities:
         type: string
         name: option
         mapping:
-          - dps_val: "0"
+          - dps_val: flip
             value: flip
-          - dps_val: "1"
+          - dps_val: sync
             value: sync
-          - dps_val: "2"
+          - dps_val: button
             value: button