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

Tongou QCB2: add extra dps and mark some optional

Comment on #2420 about 63A device that was not quite matching.
Jason Rumney 1 год назад
Родитель
Сommit
83957b54b6
1 измененных файлов с 26 добавлено и 2 удалено
  1. 26 2
      custom_components/tuya_local/devices/tongou_qcb2_circuitbreaker.yaml

+ 26 - 2
custom_components/tuya_local/devices/tongou_qcb2_circuitbreaker.yaml

@@ -1,7 +1,7 @@
 name: Circuit breaker
 products:
   - id: a0k7kwt5wkqdswnm
-    name: Tongou QCB2-WB
+    name: Tongou QCB2-WB 63A
 primary_entity:
   entity: switch
   icon: "mdi:fuse"
@@ -231,6 +231,29 @@ secondary_entities:
           - dps_val: Trip
             value: Trip
             icon: "mdi:electric-switch"
+  - entity: select
+    name: Earth leakage action
+    category: config
+    dps:
+      - id: 108
+        type: string
+        optional: true
+        name: option
+        mapping:
+          - dps_val: Closed
+            value: Remain closed
+            icon: "mdi:electric-switch-closed"
+          - dps_val: Alarm
+            value: Alarm
+            icon: "mdi:bell-alert"
+          - dps_val: Trip
+            value: Trip
+            icon: "mdi:electric-switch"
+      - id: 117
+        type: integer
+        optional: true
+        name: threshold
+        # if range and scaling known, can be made a number entity
   - entity: switch
     category: config
     name: Live updates
@@ -251,6 +274,7 @@ secondary_entities:
       - id: 110
         name: event
         type: string
+        optional: true
         mapping:
           - dps_val: Normal
             value: Normal
@@ -323,7 +347,7 @@ secondary_entities:
         unit: A
         range:
           min: 1
-          max: 63
+          max: 100
   - entity: number
     name: Overvoltage threshold
     class: voltage