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

fix (ipengen_goe3116a_evcharger): shuffle energy dps

According to user feedback, dp 1 remains unknown (no data received), and
the data on dp 17 is the actual energy consumption reading from the device.

This is contrary to the initial assumption that because dp 17 is read-write
it is for setting the fixed charge energy amount (for charge_energy mode),
and dp 1 being labelled total_forward_energy in the data model from Tuya and
read-only was the energy consumption.

Looking back on issue #3847, the original reporter had posted a config with
dp 1 and 25 commented out, backing up the evidence that these dp are not
actually used by the device.

Issue #4057
Jason Rumney 2 месяцев назад
Родитель
Сommit
d1a94851b6
1 измененных файлов с 13 добавлено и 1 удалено
  1. 13 1
      custom_components/tuya_local/devices/ipengen_goe3116a_evcharger.yaml

+ 13 - 1
custom_components/tuya_local/devices/ipengen_goe3116a_evcharger.yaml

@@ -7,7 +7,7 @@ entities:
   - entity: sensor
     class: energy
     dps:
-      - id: 1
+      - id: 17
         type: integer
         optional: true
         name: sensor
@@ -15,6 +15,12 @@ entities:
         class: total_increasing
         mapping:
           - scale: 100
+      - id: 1
+        type: integer
+        optional: true
+        name: total_forward_energy
+        mapping:
+          - scale: 100
   - entity: number
     name: Charging current
     class: current
@@ -294,6 +300,12 @@ entities:
     name: Fixed charge
     category: config
     class: energy_storage
+    # Hidden, because there is confusion over the purpose of this dp.
+    # In Query Things Data Model it is shown as read-write and based on
+    # other EV chargers, should be for setting the amount of energy for
+    # a fixed charge, but user feedback is that the total_forward_energy
+    # on dp 1 does not ever appear, and this dp should be used instead.
+    hidden: true
     dps:
       - id: 17
         type: integer