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

feat (devices): add Suntree SPG3 EV charger

Issue #4410
Jason Rumney 14 часов назад
Родитель
Сommit
f43ad268fd
3 измененных файлов с 525 добавлено и 0 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 523 0
      custom_components/tuya_local/devices/suntree_spg3_evcharger.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1292,4 +1292,5 @@ Further device support has been made with the assistance of users. Please consid
 - [arayanhasgithub](https://github.com/arayanhasgithub) for contributing support for A.O. Smith HeatBot 15L water heater.
 - [jmlugo15](https://github.com/jmlugo15) for assisting with support for Qiachipceiling fan with light.
 - [sydneysider123](https://github.com/sydneysider123) for assisting with support for Ausclimate EcoSmart pedestal fan.
+- [ClarkAlmazan](https://github.com/ClarkAlmazan) for assisting with support for Suntree SPG3 EV charger.
 

+ 1 - 0
DEVICES.md

@@ -665,6 +665,7 @@ devices # Supported
 - Parkside PLGS 2012 A1 smart charger for powertools
 - SEVR X1 EV charger
 - SRNE SE Series lithium battery
+- Suntree SPG3 EV charger
 - Tary TA-AC380/22 EV charger
 - Tera W01 EV charger
 - Vevor Level 2, portable 7kW and 3.7kW EV chargers

+ 523 - 0
custom_components/tuya_local/devices/suntree_spg3_evcharger.yaml

@@ -0,0 +1,523 @@
+name: EV charger
+products:
+  - id: v8rqiotvvhkw4ldq
+    manufacturer: Suntree
+    model: SPG3
+entities:
+  - entity: sensor
+    class: energy
+    dps:
+      - id: 1
+        type: integer
+        name: sensor
+        unit: kWh
+        class: total_increasing
+        mapping:
+          - scale: 100
+  - entity: sensor
+    translation_key: status
+    icon: "mdi:ev-station"
+    class: enum
+    dps:
+      - id: 3
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: charger_charging
+            value: charging
+          - dps_val: charger_free
+            value: available
+          - dps_val: charger_insert
+            value: plugged_in
+          - dps_val: charger_free_fault
+            value: fault_unplugged
+          - dps_val: charger_wait
+            value: waiting
+          - dps_val: charger_pause
+            value: paused
+          - dps_val: charger_end
+            value: charged
+          - dps_val: charger_fault
+            value: fault
+      - id: 23
+        type: string
+        name: system_version
+      - id: 107
+        type: base64
+        optional: true
+        name: picture
+  - entity: number
+    category: config
+    class: current
+    icon: "mdi:ev-plug-type2"
+    dps:
+      - id: 4
+        type: integer
+        name: value
+        unit: A
+        range:
+          min: 6
+          max: 16
+  - entity: sensor
+    class: power
+    dps:
+      - id: 9
+        type: integer
+        name: sensor
+        unit: kW
+        class: measurement
+        mapping:
+          - scale: 1000
+      - id: 5
+        type: integer
+        optional: true
+        name: single_phase
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: voltage
+    category: diagnostic
+    translation_key: voltage_x
+    translation_placeholders:
+      x: A
+    dps:
+      - id: 6
+        type: base64
+        name: sensor
+        optional: true
+        unit: V
+        mask: "FFFF000000000000"
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: current
+    category: diagnostic
+    translation_key: current_x
+    translation_placeholders:
+      x: A
+    dps:
+      - id: 6
+        type: base64
+        name: sensor
+        optional: true
+        unit: A
+        mask: "000000FFFF000000"
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: power
+    category: diagnostic
+    translation_key: power_x
+    translation_placeholders:
+      x: A
+    dps:
+      - id: 6
+        type: base64
+        name: sensor
+        optional: true
+        unit: kW
+        class: measurement
+        mask: "000000000000FFFF"
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    class: voltage
+    category: diagnostic
+    hidden: unavailable
+    translation_key: voltage_x
+    translation_placeholders:
+      x: B
+    dps:
+      - id: 7
+        type: base64
+        name: sensor
+        optional: true
+        unit: V
+        mask: "FFFF000000000000"
+        mapping:
+          - scale: 10
+      - id: 7
+        type: base64
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: sensor
+    class: current
+    category: diagnostic
+    hidden: unavailable
+    translation_key: current_x
+    translation_placeholders:
+      x: B
+    dps:
+      - id: 7
+        type: base64
+        name: sensor
+        optional: true
+        unit: A
+        mask: "000000FFFF000000"
+        mapping:
+          - scale: 1000
+      - id: 7
+        type: base64
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: sensor
+    class: power
+    category: diagnostic
+    hidden: unavailable
+    translation_key: power_x
+    translation_placeholders:
+      x: B
+    dps:
+      - id: 7
+        type: base64
+        name: sensor
+        optional: true
+        unit: kW
+        class: measurement
+        mask: "000000000000FFFF"
+        mapping:
+          - scale: 1000
+      - id: 7
+        type: base64
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: sensor
+    class: voltage
+    category: diagnostic
+    hidden: unavailable
+    translation_key: voltage_x
+    translation_placeholders:
+      x: C
+    dps:
+      - id: 8
+        type: base64
+        name: sensor
+        optional: true
+        unit: V
+        mask: "FFFF000000000000"
+        mapping:
+          - scale: 10
+      - id: 8
+        type: base64
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: sensor
+    class: current
+    category: diagnostic
+    hidden: unavailable
+    translation_key: current_x
+    translation_placeholders:
+      x: C
+    dps:
+      - id: 8
+        type: base64
+        name: sensor
+        optional: true
+        unit: A
+        mask: "000000FFFF000000"
+        mapping:
+          - scale: 1000
+      - id: 8
+        type: base64
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - entity: sensor
+    class: power
+    category: diagnostic
+    hidden: unavailable
+    translation_key: power_x
+    translation_placeholders:
+      x: C
+    dps:
+      - id: 8
+        type: base64
+        name: sensor
+        optional: true
+        unit: kW
+        class: measurement
+        mask: "000000000000FFFF"
+        mapping:
+          - scale: 1000
+      - id: 8
+        type: base64
+        optional: true
+        name: available
+        mapping:
+          - dps_val: null
+            value: false
+          - value: true
+  - 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: ok
+          - dps_val: 1
+            value: Over voltage
+          - dps_val: 2
+            value: Under voltage
+          - dps_val: 4
+            value: Over current
+          - dps_val: 8
+            value: PCB temperature
+          - dps_val: 16
+            value: Earth
+          - dps_val: 32
+            value: CP voltage
+          - dps_val: 64
+            value: Relay
+          - dps_val: 128
+            value: Earth leakage
+          - dps_val: 256
+            value: Stuck relay
+          - dps_val: 512
+            value: Earth leakage self-test
+          - dps_val: 1024
+            value: Vehicle diode
+          - dps_val: 2048
+            value: Charging gun temperature
+          - dps_val: 4096
+            value: Input plug temperature
+          - dps_val: 8192
+            value: Frequency abnormal
+          - dps_val: 16384
+            value: Emergency stop
+          - dps_val: 32768
+            value: Card reader
+          - dps_val: 65536
+            value: Meter
+          - dps_val: 131072
+            value: Electronic lock
+          - dps_val: 262144
+            value: Rectifier module
+          - dps_val: 524288
+            value: Insulation
+          - dps_val: 1048576
+            value: Battery polarity
+          - dps_val: 2097152
+            value: Communication timeout
+          - dps_val: 4194304
+            value: CC voltage
+          - dps_val: 8388608
+            value: Pre-charge timeout
+          - dps_val: 16777216
+            value: Fan
+          - dps_val: 33554432
+            value: "No current"
+          - dps_val: 67108864
+            value: Module temperature
+          - dps_val: 134217728
+            value: Module communication
+  - entity: select
+    translation_key: charging_mode
+    category: config
+    dps:
+      - id: 14
+        type: string
+        name: option
+        mapping:
+          - dps_val: charge_now
+            value: immediate
+          - dps_val: charge_pct
+            value: charge_to_percent
+          - dps_val: charge_energy
+            value: fixed_charge
+          - dps_val: charge_schedule
+            value: scheduled_charge
+          - dps_val: charge_delay
+            value: delayed_charge
+  - entity: switch
+    icon: "mdi:ev-station"
+    dps:
+      - id: 18
+        type: boolean
+        name: switch
+  - entity: sensor
+    class: temperature
+    category: diagnostic
+    dps:
+      - id: 24
+        type: integer
+        name: sensor
+        unit: C
+        class: measurement
+  - entity: sensor
+    name: Last charge
+    dps:
+      - id: 25
+        type: integer
+        name: sensor
+        unit: kWh
+        class: measurement
+        optional: true
+        mapping:
+          - scale: 100
+  - entity: switch
+    name: Live updates
+    icon: "mdi:chart-bar"
+    category: diagnostic
+    dps:
+      - id: 27
+        optional: true
+        type: string
+        name: switch
+        mapping:
+          - dps_val: offline
+            value: false
+          - dps_val: online
+            value: true
+          - value: false
+            hidden: true
+  - entity: number
+    translation_key: timer
+    class: duration
+    category: config
+    dps:
+      - id: 28
+        type: integer
+        name: value
+        unit: h
+        optional: true
+        range:
+          min: 0
+          max: 15
+      - id: 14
+        type: string
+        name: available
+        mapping:
+          - dps_val: charge_delay
+            value: true
+          - value: false
+  - entity: text
+    name: Charging mode
+    category: config
+    icon: "mdi:ev-station"
+    hidden: true
+    dps:
+      - id: 33
+        type: base64
+        optional: true
+        name: value
+  - entity: time
+    name: Charge time
+    category: config
+    dps:
+      - id: 101
+        type: base64
+        optional: true
+        mask: "FF00"
+        name: hour
+      - id: 101
+        type: base64
+        optional: true
+        mask: "00FF"
+        name: minute
+      - id: 14
+        type: string
+        name: available
+        mapping:
+          - dps_val: charge_schedule
+            value: true
+          - value: false
+  - entity: sensor
+    name: Output voltage
+    class: voltage
+    category: diagnostic
+    dps:
+      - id: 102
+        type: base64
+        mask: "FFFF000000000000"
+        optional: true
+        name: sensor
+        unit: V
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: sensor
+    name: Output current
+    class: current
+    category: diagnostic
+    dps:
+      - id: 102
+        type: base64
+        mask: "0000FFFFFF000000"
+        optional: true
+        name: sensor
+        unit: A
+        class: measurement
+        mapping:
+          - scale: 1000
+  - entity: sensor
+    name: Output power
+    class: power
+    category: diagnostic
+    dps:
+      - id: 102
+        type: base64
+        mask: "0000000000FFFFFF"
+        optional: true
+        name: sensor
+        unit: kW
+        class: measurement
+        mapping:
+          - scale: 1000
+  - entity: switch
+    name: Plug to charge
+    category: config
+    dps:
+      - id: 104
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Unearthed charging
+    category: config
+    dps:
+      - id: 105
+        type: boolean
+        name: switch
+  - entity: number
+    name: Charging duration
+    category: config
+    class: duration
+    dps:
+      - id: 106
+        type: integer
+        name: value
+        unit: h
+        range:
+          min: 0
+          max: 48