Sfoglia il codice sorgente

Add feyree EV portable charger device mapping (item link : https://aliexpress.com/item/1005008278945968.html)

julian 10 mesi fa
parent
commit
08b4dba38a

+ 152 - 0
custom_components/tuya_local/devices/feyree_ev_portable_charger.yaml

@@ -0,0 +1,152 @@
+name: EV portable charger
+products:
+  - id: 4ooiu7apnjjumn0d
+    manufacturer: Feyree
+    model: F-M24
+entities:
+  - entity: sensor
+    class: enum
+    translation_key: status
+    icon: "mdi:ev-station"
+    dps:
+      - id: 3
+        type: string
+        optional: true
+        name: work_state
+        mapping:
+          - dps_val: charger_free
+          - dps_val: charger_insert
+          - dps_val: charger_free_fault
+          - dps_val: charger_wait
+          - dps_val: charger_charging
+          - dps_val: charger_pause
+          - dps_val: charger_end
+          - dps_val: charger_fault
+      - id: 14
+        type: string
+        optional: true
+        name: work_mode
+        mapping:
+          - dps_val: charge_now
+          - dps_val: charge_pct
+          - dps_val: charge_energy
+          - dps_val: charge_schedule
+      - id: 15
+        type: integer
+        optional: true
+        name: balance_energy
+        unit: A
+        range:
+          min: 8
+          max: 16
+        mapping:
+          - scale: 3
+      - id: 18
+        type: boolean
+        optional: true
+        name: switch
+      - id: 25
+        type: integer
+        optional: true
+        name: charge_energy_once
+        unit: kWh
+        range:
+          min: 0
+          max: 999999
+        mapping:
+          - scale: 2
+  - entity: button
+    name: Clear energy
+    class: restart
+    category: config
+    dps:
+      - id: 16
+        type: boolean
+        name: button
+        optional: true
+  - entity: number
+    name: Set charge current
+    icon: "mdi:ev-plug-type2"
+    dps:
+      - id: 114
+        type: integer
+        name: value
+        unit: A
+        range:
+          min: 8
+          max: 16
+  - entity: number
+    name: Charge delay
+    category: config
+    icon: "mdi:car-clock"
+    dps:
+      - id: 118
+        type: integer
+        name: value
+        unit: h
+        range:
+          min: 0
+          max: 15
+  - entity: number
+    name: Current charge current
+    icon: "mdi:ev-plug-type2"
+    category: config
+    dps:
+      - id: 105
+        type: integer
+        unit: mA
+        mapping:
+          - scale: 1
+        optional: true
+        name: current
+  - entity: sensor
+    class: power
+    dps:
+      - id: 109
+        type: integer
+        name: sensor
+        unit: kW
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 110
+        type: integer
+        name: sensor
+        unit: C
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: switch
+    name: Start/Stop charging
+    dps:
+      - id: 124
+        type: string
+        optional: true
+        name: switch
+        mapping:
+          - dps_val: "CloseCharging"
+            value: false
+            default: true
+          - dps_val: "OpenCharging"
+            value: true
+  # Commented type mismatch
+  # - entity: switch
+  #   name: Charging enable
+  #   icon: "mdi:ev-station"
+  #   dps:
+  #     - id: 112
+  #       type: boolean
+  #       name: switch
+  - entity: sensor
+    class: voltage
+    category: diagnostic
+    dps:
+      - id: 102
+        type: integer
+        name: sensor
+        unit: V
+        class: measurement