Bläddra i källkod

Added: "Alarm event", "Current", "Energy", "Charging time" sensors and "Charging duration" input number.
Fixed: Voltage scale and Status typo ("no_connet" is what comes from the device)

Yurii 8 månader sedan
förälder
incheckning
26af0fd4b4
1 ändrade filer med 85 tillägg och 1 borttagningar
  1. 85 1
      custom_components/tuya_local/devices/feyree_ev_portable_charger.yaml

+ 85 - 1
custom_components/tuya_local/devices/feyree_ev_portable_charger.yaml

@@ -13,7 +13,7 @@ entities:
         type: string
         name: sensor
         mapping:
-          - dps_val: no_connect
+          - dps_val: no_connet
             value: available
           - dps_val: connect
             value: plugged_in
@@ -73,6 +73,49 @@ entities:
           max: 999999
         mapping:
           - scale: 2
+  - entity: sensor
+    name: Alarm event
+    icon: 'mdi:alert-outline'
+    class: enum
+    dps:
+      - id: 10
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: "Ready"
+          - dps_val: 1
+            value: "Under voltage protection"
+          - dps_val: 2
+            value: "Over voltage protection"
+          - dps_val: 4
+            value: "Over current protection"
+          - dps_val: 8
+            value: "Protective earth error"
+          - dps_val: 16
+            value: "Temperature is to high"
+          - dps_val: 32
+            value: "Control pilot line error"
+          - dps_val: 64
+            value: "Leak"
+          - dps_val: 128
+            value: "Relay socket"
+          - dps_val: 256
+            value: "Protective earth error 2"
+          - dps_val: 512
+            value: "Plug temperature is to high."
+          - dps_val: 1024
+            value: "PCB temperature is to high."
+          - dps_val: 2048
+            value: "Core temperature is to high."
+          - dps_val: 4096
+            value: "ESB"
+          - dps_val: 8192
+            value: "Socket protective earth error"
+          - dps_val: 16384
+            value: "Socket leakage"
+          - dps_val: 32768
+            value: "Socket temperature is to high."
   - entity: button
     name: Clear energy
     class: restart
@@ -147,3 +190,44 @@ entities:
         name: sensor
         unit: V
         class: measurement
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: current
+    dps:
+      - id: 105
+        type: integer
+        name: sensor
+        unit: A
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: energy
+    dps:
+      - id: 112
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 10
+  - entity: number
+    name: Charging duration
+    category: config
+    icon: "mdi:car-clock"
+    dps:
+      - id: 119
+        type: integer
+        name: value
+        unit: h
+        range:
+          min: 0
+          max: 15
+  - entity: sensor
+    name: Charging time
+    category: diagnostic
+    dps:
+      - id: 120
+        type: string
+        name: sensor