Procházet zdrojové kódy

Unknown 2-way meter: use total as main energy reading

- use total as main energy reading, and daily as attribute.
Original used daily as main because that was the first reading encountered.

Portion of PR #2481 which does not involve entity renaming.
The more disruptive naming changes will be included when translations for
those sensors are added as part of issue #1708 (actually since it involves
translation parameters, as part of a new issue which is not filed yet)
Jason Rumney před 1 rokem
rodič
revize
fbc1682cbc

+ 12 - 12
custom_components/tuya_local/devices/unknow_2way_energymeter.yaml

@@ -151,16 +151,16 @@ secondary_entities:
     class: energy
     category: diagnostic
     dps:
-      - id: 107
+      - id: 115
         type: integer
         name: sensor
         unit: kWh
         class: total_increasing
         mapping:
           - scale: 100
-      - id: 114
+      - id: 107
         type: integer
-        name: total
+        name: daily
         mapping:
           - scale: 100
       - id: 118
@@ -182,7 +182,7 @@ secondary_entities:
     class: energy
     category: diagnostic
     dps:
-      - id: 108
+      - id: 115
         type: integer
         name: sensor
         unit: kWh
@@ -198,9 +198,9 @@ secondary_entities:
           max: 1200
         mapping:
           - scale: 1000
-      - id: 115
+      - id: 108
         type: integer
-        name: total
+        name: daily
         mapping:
           - scale: 100
       - id: 119
@@ -270,16 +270,16 @@ secondary_entities:
     class: energy
     category: diagnostic
     dps:
-      - id: 112
+      - id: 116
         type: integer
         name: sensor
         unit: kWh
         class: total_increasing
         mapping:
           - scale: 100
-      - id: 116
+      - id: 112
         type: integer
-        name: total
+        name: daily
         mapping:
           - scale: 100
       - id: 120
@@ -301,7 +301,7 @@ secondary_entities:
     class: energy
     category: diagnostic
     dps:
-      - id: 113
+      - id: 117
         type: integer
         name: sensor
         unit: kWh
@@ -317,9 +317,9 @@ secondary_entities:
           max: 1200
         mapping:
           - scale: 1000
-      - id: 117
+      - id: 113
         type: integer
-        name: total
+        name: daily
         mapping:
           - scale: 100
       - id: 121