Przeglądaj źródła

Add scale factors to power/current/voltage readings

As per first variant of Kogan switch, the second variant also needs scaling.
Jason Rumney 4 lat temu
rodzic
commit
f4ea5b440d

+ 6 - 0
custom_components/tuya_local/devices/kogan_switch2.yaml

@@ -14,11 +14,17 @@ primary_entity:
       type: integer
       name: current_a
       read-only: true
+      mapping:
+        - scale: 1000
     - id: 19
       type: integer
       name: current_power_w
       read-only: true
+      mapping:
+        - scale: 10
     - id: 20
       type: integer
       name: voltage_v
       read-only: true
+      mapping:
+        - scale: 10