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

kolanky_evcharger: support GOODCELL 32A variant charge current (#5278)

* kolanky_evcharger: support GOODCELL 32A variant charge current

The 7bvgooyjhiua1yyq product id is also sold as a GOODCELL 7.2kW 32A
charger. Charge current was hardcoded to dp 114 (Set16A, 6-16A), which
clamps at 16 on 32A units. Follow DeviceMaxSetA (dp 113): use Set32A
(dp 115, 8-32A) by default, redirect to Set16A (dp 114, 6-16A) in 16A
mode. Same pattern as goodcell_ev_charger.yaml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* kolanky_evcharger: default to 16A band, escalate to 32A only on Max32A

Per review: make the lowest-current model the default so a device that
does not report max_current can't be set to an overload current. dp 114
(Set16A, 6-16A) is now primary; redirect to dp 115 (Set32A, 8-32A) only
when DeviceMaxSetA reports Max32A.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Merge products

There should not be duplicate product ids in the list.
Just mention both manufacturers, and drop the model, since it seems all model variants are using the same product id.

---------

Co-authored-by: jaypo82 <jaypo82@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
jaypo82 3 недель назад
Родитель
Сommit
e0b07c674c
1 измененных файлов с 25 добавлено и 2 удалено
  1. 25 2
      custom_components/tuya_local/devices/kolanky_evcharger.yaml

+ 25 - 2
custom_components/tuya_local/devices/kolanky_evcharger.yaml

@@ -1,8 +1,7 @@
 name: EV charger
 products:
   - id: 7bvgooyjhiua1yyq
-    manufacturer: Kolanky
-    model: "3.6kW"
+    manufacturer: Kolanky / Goodcell
 entities:
   - entity: sensor
     translation_key: status
@@ -58,6 +57,30 @@ entities:
         range:
           min: 6
           max: 16
+        mapping:
+          - constraint: max_current
+            conditions:
+              - dps_val: Max32A
+                value_redirect: value_alt
+                range:
+                  min: 8
+                  max: 32
+      - id: 115
+        type: integer
+        optional: true
+        name: value_alt
+        unit: A
+        range:
+          min: 8
+          max: 32
+      - id: 113
+        type: string
+        name: max_current
+        mapping:
+          - dps_val: Max16A
+            value: Max16A
+          - dps_val: Max32A
+            value: Max32A
   - entity: number
     name: Delay
     class: duration