Răsfoiți Sursa

SmartMCB: add Charge energy setting

- fix naming
- add charge energy from issue #2694
   - SmartMCB devices should have this too, since they have balance energy and prepaid switch.
- would add product details for #2694, but the product id is listed inconsistently between report and config.
Jason Rumney 1 an în urmă
părinte
comite
ce3ff8bdb7

+ 19 - 1
custom_components/tuya_local/devices/smartmcb_smt006_energymeterv2.yaml

@@ -1,7 +1,9 @@
-name: SmartMCB SMT006-8 energy meter
+name: Energy meter
 products:
   - id: 3xhdofmeo6lgpvd5
+    name: SmartMCB SMT006-8
   - id: i5mqmxkho1vahdt2
+    name: SmartMCB SMT006-8
 primary_entity:
   entity: switch
   icon: "mdi:fuse"
@@ -163,3 +165,19 @@ secondary_entities:
         unit: mA
         class: measurement
         optional: true
+  - entity: number
+    name: Charge energy
+    category: config
+    class: energy_storage
+    icon: "mdi:cash"
+    dps:
+      - id: 14
+        type: integer
+        name: value
+        unit: kWh
+        optional: true
+        range:
+          min: 0
+          max: 999999
+        mapping:
+          - scale: 100