Procházet zdrojové kódy

fix(cesmarthome_monitoring_smartplug): scale voltage and power

Contrary to the Query Things Data Model info, voltage and power need to be scaled by 10.

Issue #5092
Jason Rumney před 4 dny
rodič
revize
afa08419ae

+ 4 - 0
custom_components/tuya_local/devices/cesmarthome_monitoring_smartplug.yaml

@@ -60,6 +60,8 @@ entities:
         name: sensor
         name: sensor
         unit: W
         unit: W
         class: measurement
         class: measurement
+        mapping:
+          - scale: 10
       - id: 10
       - id: 10
         type: integer
         type: integer
         optional: true
         optional: true
@@ -72,6 +74,8 @@ entities:
         name: sensor
         name: sensor
         unit: V
         unit: V
         class: measurement
         class: measurement
+        mapping:
+          - scale: 10
       - id: 8
       - id: 8
         type: integer
         type: integer
         optional: true
         optional: true