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

WDYK 2P 63A energy meter: omit last 2 bytes from Phase B and C masks

The phase decoding was originally implemented blindly based on other devices
in #659. Doc confirming this format were supplied in #1078, but still no logs.

Based on the diagnostics in issue #1717, only phase A appears to use the
documented format with 2 bytes voltage, 3 bytes each for current and power,
and 2 bytes for residual current.  Other phases appear to drop the residual
current, meaning everything else needs to shift by two bytes.
Jason Rumney 2 лет назад
Родитель
Сommit
1aa05050f9
1 измененных файлов с 9 добавлено и 9 удалено
  1. 9 9
      custom_components/tuya_local/devices/wdyk_2p63a_energy_meter.yaml

+ 9 - 9
custom_components/tuya_local/devices/wdyk_2p63a_energy_meter.yaml

@@ -308,7 +308,7 @@ secondary_entities:
         optional: true
         unit: V
         mapping:
-          - mask: "FFFFFF0000000000000000"
+          - mask: "FFFF0000000000000000"
             scale: 10
   - entity: sensor
     name: Current A
@@ -321,7 +321,7 @@ secondary_entities:
         optional: true
         unit: A
         mapping:
-          - mask: "000000FFFFFF0000000000"
+          - mask: "0000FFFFFF0000000000"
             scale: 1000
   - entity: sensor
     name: Power A
@@ -334,7 +334,7 @@ secondary_entities:
         optional: true
         unit: kW
         mapping:
-          - mask: "000000000000FFFFFF0000"
+          - mask: "0000000000FFFFFF0000"
             scale: 1000
   - entity: sensor
     name: Voltage B
@@ -347,7 +347,7 @@ secondary_entities:
         optional: true
         unit: V
         mapping:
-          - mask: "FFFFFF0000000000000000"
+          - mask: "FFFF000000000000"
             scale: 10
   - entity: sensor
     name: Current B
@@ -360,7 +360,7 @@ secondary_entities:
         optional: true
         unit: A
         mapping:
-          - mask: "000000FFFFFF0000000000"
+          - mask: "0000FFFFFF000000"
             scale: 1000
   - entity: sensor
     name: Power B
@@ -373,7 +373,7 @@ secondary_entities:
         optional: true
         unit: kW
         mapping:
-          - mask: "000000000000FFFFFF0000"
+          - mask: "0000000000FFFFFF"
             scale: 1000
   - entity: sensor
     name: Voltage C
@@ -386,7 +386,7 @@ secondary_entities:
         optional: true
         unit: V
         mapping:
-          - mask: "FFFFFF0000000000000000"
+          - mask: "FFFF000000000000"
             scale: 10
   - entity: sensor
     name: Current C
@@ -399,7 +399,7 @@ secondary_entities:
         optional: true
         unit: A
         mapping:
-          - mask: "000000FFFFFF0000000000"
+          - mask: "0000FFFFFF000000"
             scale: 1000
   - entity: sensor
     name: Power C
@@ -412,7 +412,7 @@ secondary_entities:
         optional: true
         unit: kW
         mapping:
-          - mask: "000000000000FFFFFF0000"
+          - mask: "0000000000FFFFFF"
             scale: 1000
   - entity: number
     name: Overvoltage threshold