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

feat(wdyk_2p63a_energy_meter): improve compatibility with other devices

- add compatible Brinna SPFW-63 single phase device
- make unreported dps by that device optional
- hide unavailable phase B and C and Total energy reset button by default
  (single phase devices will be common, users can unhide if they have
   two or three phase devices, and reset button is anyway dangerous to
   expose in the UI by default).

PR #6012 by @fran122157
Jason Rumney 11 часов назад
Родитель
Сommit
f077191990
1 измененных файлов с 13 добавлено и 0 удалено
  1. 13 0
      custom_components/tuya_local/devices/wdyk_2p63a_energy_meter.yaml

+ 13 - 0
custom_components/tuya_local/devices/wdyk_2p63a_energy_meter.yaml

@@ -3,6 +3,9 @@ products:
   - id: r9kg2g1uhhyicycb
     manufacturer: WDYK
     model: 2P63A
+  - id: ai1wxf8tow62uieb
+    manufacturer: Brinna
+    model: SPFW-63
 entities:
   - entity: sensor
     class: energy
@@ -115,6 +118,7 @@ entities:
     dps:
       - id: 13
         type: integer
+        optional: true
         name: sensor
         unit: kWh
         class: measurement
@@ -194,6 +198,7 @@ entities:
     translation_placeholders:
       x: B
     class: voltage
+    hidden: true
     dps:
       - id: 7
         type: base64
@@ -209,6 +214,7 @@ entities:
     translation_placeholders:
       x: B
     class: current
+    hidden: true
     dps:
       - id: 7
         type: base64
@@ -224,6 +230,7 @@ entities:
     translation_placeholders:
       x: B
     class: power
+    hidden: true
     dps:
       - id: 7
         type: base64
@@ -239,6 +246,7 @@ entities:
     translation_placeholders:
       x: C
     class: voltage
+    hidden: true
     dps:
       - id: 8
         type: base64
@@ -254,6 +262,7 @@ entities:
     translation_placeholders:
       x: C
     class: current
+    hidden: true
     dps:
       - id: 8
         type: base64
@@ -269,6 +278,7 @@ entities:
     translation_placeholders:
       x: C
     class: power
+    hidden: true
     dps:
       - id: 8
         type: base64
@@ -325,6 +335,7 @@ entities:
     dps:
       - id: 104
         type: integer
+        optional: true
         name: value
         unit: mA
         range:
@@ -336,6 +347,7 @@ entities:
     dps:
       - id: 105
         type: boolean
+        optional: true
         name: switch
         mapping:
           - dps_val: true
@@ -354,6 +366,7 @@ entities:
     name: Reset total energy
     class: restart
     category: config
+    hidden: true
     dps:
       - id: 115
         type: boolean