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

Add support for eMylo smart meter

Issue #529
Jason Rumney 2 лет назад
Родитель
Сommit
4860fb9954
3 измененных файлов с 97 добавлено и 0 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 95 0
      custom_components/tuya_local/devices/emylo_energy_meter.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -218,3 +218,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [ettiennegous](https://github.com/ettiennegous) for assisting with support for BrilliantSmart RGB garden lights.
 - [yarosman](https://github.com/yarosman) for contributing Avatto WT81 support, which was merged with the Beok TGR81.
 - [endrumaj](https://github.com/endrumaj) for assisting with support for Treatlife DS03 ceiling fans with lights.
+- [fjvva](https://github.com/fjvva) for assisting with support for eMylo smart meters.

+ 1 - 0
DEVICES.md

@@ -180,6 +180,7 @@
 ### Smart Meter/Circuit Breaker
 
 - Compteur digital electric (single phase)
+- eMylo EAI-90 smart meter
 - PC321-TY 3 phase power clamp meter
 - PJ-1103 power clamp meter
 - SG600MD Smart Solar Inverter (also SG700MD, other SGxx0MD and SGxx0W models) sold under various brands

+ 95 - 0
custom_components/tuya_local/devices/emylo_energy_meter.yaml

@@ -0,0 +1,95 @@
+name: eMylo meter
+products:
+  - id: nqbs1onwskmmmaac
+    name: EAI-90
+primary_entity:
+  entity: sensor
+  name: Energy
+  class: energy
+  dps:
+    - id: 1
+      type: integer
+      name: sensor
+      unit: kWh
+      class: total_increasing
+      mapping:
+        - scale: 100
+    - id: 6
+      type: string
+      name: phase_a
+      optional: true
+    - id: 10
+      type: bitfield
+      name: fault_code
+    - id: 17
+      type: string
+      name: alarm
+      optional: true
+secondary_entities:
+  - entity: binary_sensor
+    name: Fault
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 10
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+  - entity: switch
+    name: Prepayment
+    category: config
+    icon: "mdi:cash"
+    dps:
+      - id: 12
+        type: boolean
+        name: switch
+  - entity: sensor
+    name: Prepaid energy
+    category: diagnostic
+    dps:
+      - id: 13
+        type: integer
+        name: sensor
+        unit: kWh
+        optional: true
+        mapping:
+          - scale: 100
+  - entity: button
+    name: Clear energy
+    class: reset
+    category: config
+    dps:
+      - id: 14
+        type: boolean
+        name: button
+        optional: true
+  - entity: number
+    name: Charge energy
+    category: config
+    icon: "mdi:cash"
+    dps:
+      - id: 15
+        type: integer
+        name: value
+        unit: kWh
+        optional: true
+        range:
+          min: 0
+          max: 50000
+  - entity: switch
+    dps:
+      - id: 16
+        type: boolean
+        name: switch
+  - entity: button
+    name: Clear event
+    class: reset
+    category: config
+    dps:
+      - id: 20
+        type: boolean
+        name: button
+        optional: true