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

GTS8 40 2P breaker: fixes to config

- don't include "Tuya" in device name - they make the WiFi module and cloud service not the end device.
- quote strings that can be interpreted as boolean in yaml.
- use correct dp naming for the entity type (not original Tuya naming).
- use translations where available

PR #2987
Jason Rumney 1 год назад
Родитель
Сommit
6d48682328
1 измененных файлов с 15 добавлено и 11 удалено
  1. 15 11
      custom_components/tuya_local/devices/gts8_40_2P_breaker.yaml

+ 15 - 11
custom_components/tuya_local/devices/tuya_gts8_40_2P_breaker.yaml → custom_components/tuya_local/devices/gts8_40_2P_breaker.yaml

@@ -1,38 +1,42 @@
 name: Circuit breaker
 products:
   - id: kooaoam3tyfqanva
-    manufacturer: Tuya
     model: GTS8-40 2P
 entities:
   - entity: switch
     name: Breaker
+    icon: "mdi:fuse"
     dps:
       - id: 1
         type: boolean
         name: switch
   - entity: number
-    name: Countdown
+    translation_key: timer
     category: config
+    class: duration
     dps:
       - id: 101
         type: integer
-        name: countdown
-        unit: "s"
+        name: value
+        unit: min
         range:
           min: 0
           max: 86400
+        mapping:
+          - scale: 60
+            step: 60
   - entity: select
-    name: Relay status
+    translation_key: initial_state
     category: config
     dps:
       - id: 102
         type: string
-        name: relay_status
+        name: option
         mapping:
-          - dps_val: off
-            value: OFF
-          - dps_val: on
-            value: ON
+          - dps_val: "off"
+            value: "off"
+          - dps_val: "on"
+            value: "on"
           - dps_val: memory
-            value: Memory
+            value: memory