Quellcode durchsuchen

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 vor 1 Monat
Ursprung
Commit
f077191990
1 geänderte Dateien mit 13 neuen und 0 gelöschten Zeilen
  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
   - id: r9kg2g1uhhyicycb
     manufacturer: WDYK
     manufacturer: WDYK
     model: 2P63A
     model: 2P63A
+  - id: ai1wxf8tow62uieb
+    manufacturer: Brinna
+    model: SPFW-63
 entities:
 entities:
   - entity: sensor
   - entity: sensor
     class: energy
     class: energy
@@ -115,6 +118,7 @@ entities:
     dps:
     dps:
       - id: 13
       - id: 13
         type: integer
         type: integer
+        optional: true
         name: sensor
         name: sensor
         unit: kWh
         unit: kWh
         class: measurement
         class: measurement
@@ -194,6 +198,7 @@ entities:
     translation_placeholders:
     translation_placeholders:
       x: B
       x: B
     class: voltage
     class: voltage
+    hidden: true
     dps:
     dps:
       - id: 7
       - id: 7
         type: base64
         type: base64
@@ -209,6 +214,7 @@ entities:
     translation_placeholders:
     translation_placeholders:
       x: B
       x: B
     class: current
     class: current
+    hidden: true
     dps:
     dps:
       - id: 7
       - id: 7
         type: base64
         type: base64
@@ -224,6 +230,7 @@ entities:
     translation_placeholders:
     translation_placeholders:
       x: B
       x: B
     class: power
     class: power
+    hidden: true
     dps:
     dps:
       - id: 7
       - id: 7
         type: base64
         type: base64
@@ -239,6 +246,7 @@ entities:
     translation_placeholders:
     translation_placeholders:
       x: C
       x: C
     class: voltage
     class: voltage
+    hidden: true
     dps:
     dps:
       - id: 8
       - id: 8
         type: base64
         type: base64
@@ -254,6 +262,7 @@ entities:
     translation_placeholders:
     translation_placeholders:
       x: C
       x: C
     class: current
     class: current
+    hidden: true
     dps:
     dps:
       - id: 8
       - id: 8
         type: base64
         type: base64
@@ -269,6 +278,7 @@ entities:
     translation_placeholders:
     translation_placeholders:
       x: C
       x: C
     class: power
     class: power
+    hidden: true
     dps:
     dps:
       - id: 8
       - id: 8
         type: base64
         type: base64
@@ -325,6 +335,7 @@ entities:
     dps:
     dps:
       - id: 104
       - id: 104
         type: integer
         type: integer
+        optional: true
         name: value
         name: value
         unit: mA
         unit: mA
         range:
         range:
@@ -336,6 +347,7 @@ entities:
     dps:
     dps:
       - id: 105
       - id: 105
         type: boolean
         type: boolean
+        optional: true
         name: switch
         name: switch
         mapping:
         mapping:
           - dps_val: true
           - dps_val: true
@@ -354,6 +366,7 @@ entities:
     name: Reset total energy
     name: Reset total energy
     class: restart
     class: restart
     category: config
     category: config
+    hidden: true
     dps:
     dps:
       - id: 115
       - id: 115
         type: boolean
         type: boolean