4
0
Эх сурвалжийг харах

Refinement of PJ-1103 power clamp meter based on further info

Issue #336 comment from @Cook23
 - added product id
 - made some dps optional as they are not appearing

Product is using protocol version 3.4, so may not be fully working yet.
Jason Rumney 3 жил өмнө
parent
commit
4aad1a82cb

+ 7 - 0
custom_components/tuya_local/devices/pj1103_clamp_meter.yaml

@@ -1,4 +1,6 @@
 name: PJ-1103 clamp power meter
+product:
+  - id: djfep9s6s3b2qk89
 primary_entity:
   entity: sensor
   name: Power
@@ -9,12 +11,15 @@ primary_entity:
       type: integer
       unit: W
       class: measurement
+      mapping:
+        - scale: 10
     - id: 52
       name: maximum
       type: integer
     - id: 21
       type: bitfield
       name: test
+      optional: true
 secondary_entities:
   - entity: sensor
     name: Current
@@ -41,6 +46,7 @@ secondary_entities:
       - id: 22
         type: integer
         name: calibration
+        optional: true
   - entity: number
     name: Maximum Standby Power
     category: config
@@ -48,6 +54,7 @@ secondary_entities:
       - id: 51
         type: integer
         name: value
+        optional: true
         unit: W
         range:
           min: 0