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

Add support for AFYEEV EV charger.

Issue #2108
Jason Rumney 1 год назад
Родитель
Сommit
4561c3cee5
3 измененных файлов с 192 добавлено и 0 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 190 0
      custom_components/tuya_local/devices/afyeev_evcharger.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -705,3 +705,4 @@ Further device support has been made with the assistance of users. Please consid
 - [luis-lain](https://github.com/luis-lain) for contributing support for S11+ RF+IR remote and Sulion Cadillac Fan via RF remote.
 - [gaspuas](https://github.com/gaspuas) for assisting with support for Linda Smart 7S video doorbell.
 - [joshuamns](https://github.com/joshuamns) for assisting with support for Vine TJ550 thermostat.
+- [jmcollin78](https://github.com/jmcollin78) for contributing support for AFYEEV EV charger.

+ 1 - 0
DEVICES.md

@@ -429,6 +429,7 @@
 
 ### Battery Charger
 
+- AFYEEV 32A 22kW portable EV charger
 - EcoPoint EV charger
 - EVSun EV charger
 - Feyree EV charger (several models)

+ 190 - 0
custom_components/tuya_local/devices/afyeev_evcharger.yaml

@@ -0,0 +1,190 @@
+name: EV charger
+products:
+  - id: aaaealnecwgwerjl
+    name: AFYEEV 32A 22kW
+primary_entity:
+  entity: sensor
+  class: enum
+  name: Status
+  icon: "mdi:ev-station"
+  dps:
+    - id: 3
+      type: string
+      name: sensor
+      mapping:
+        - dps_val: charger_free
+          value: Disconnected
+        - dps_val: charger_insert
+          value: Connected
+        - dps_val: charger_free_fault
+          value: Fault (disconnected)
+        - dps_val: charger_charging
+          value: Charging
+        - dps_val: charger_wait
+          value: Waiting
+        - dps_val: charger_end
+          value: Charged
+        - dps_val: charger_fault
+          value: Fault
+        - dps_val: charger_pause
+          value: Pause
+secondary_entities:
+  - entity: number
+    name: Set current
+    category: config
+    icon: "mdi:ev-plug-type2"
+    dps:
+      - id: 4
+        type: integer
+        name: value
+        unit: A
+        range:
+          min: 6
+          max: 16
+  - entity: sensor
+    name: Single phase power
+    class: power
+    category: diagnostic
+    dps:
+      - id: 5
+        type: integer
+        name: sensor
+        unit: W
+        class: measurement
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    category: diagnostic
+    dps:
+      - id: 9
+        type: integer
+        name: sensor
+        unit: W
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 10
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 10
+        type: bitfield
+        name: fault_code
+      - id: 10
+        type: bitfield
+        name: description
+        mapping:
+          - dps_val: 0
+            value: "Ready"
+          - dps_val: 1
+            value: "Ov2 Cr Fault"
+          - dps_val: 2
+            value: "OV Vol"
+          - dps_val: 4
+            value: "Undervoltage alarm"
+          - dps_val: 8
+            value: "Contactor adhesion"
+          - dps_val: 16
+            value: "Contactor fault"
+          - dps_val: 32
+            value: "Earth fault"
+          - dps_val: 64
+            value: "Meter Hardware alarm"
+          - dps_val: 128
+            value: "Scram fault"
+          - dps_val: 256
+            value: "CP fault"
+          - dps_val: 512
+            value: "Meter Commu fault"
+          - dps_val: 1024
+            value: "Card reader fault"
+          - dps_val: 2048
+            value: "Cir short fault"
+          - dps_val: 4096
+            value: "Adhesion fault"
+          - dps_val: 8192
+            value: "Self test alarm"
+          - dps_val: 16384
+            value: "Leakage current fault"
+  - entity: select
+    name: Working mode
+    icon: "mdi:list-box-outline"
+    dps:
+      - id: 14
+        type: string
+        name: option
+        mapping:
+          - dps_val: charge_now
+            value: Charge now
+          - dps_val: charge_pct
+            value: Charge PCT
+          - dps_val: charge_energy
+            value: Charge energy
+          - dps_val: charge_schedule
+            value: Charge schedule
+          - dps_val: charge_delay
+            value: Charge delay
+  - entity: switch
+    dps:
+      - id: 18
+        type: boolean
+        optional: true
+        name: switch
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
+  - entity: sensor
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 24
+        type: integer
+        name: sensor
+        unit: C
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: energy
+    dps:
+      - id: 25
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        optional: true
+        mapping:
+          - scale: 100
+  - entity: binary_sensor
+    class: connectivity
+    category: diagnostic
+    dps:
+      - id: 27
+        type: string
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: offline
+            value: false
+          - dps_val: online
+            value: true
+  - entity: number
+    translation_key: timer
+    dps:
+      - id: 28
+        type: integer
+        name: value
+        unit: h
+        optional: true
+        range:
+          min: 0
+          max: 15