Преглед изворни кода

Energy meters: use total_increasing for energy sensors.

Some of the sensors were marked as measurement, but this results in
errors if someone tries to add them to the energy dashboard.
Mark them as total_increasing, as they should be.

Issue #1081
Jason Rumney пре 2 година
родитељ
комит
c7f3cc17d3

+ 1 - 1
custom_components/tuya_local/devices/aulifants_energymonitor_breaker.yaml

@@ -11,7 +11,7 @@ primary_entity:
       type: integer
       type: integer
       name: sensor
       name: sensor
       unit: kWh
       unit: kWh
-      class: measurement
+      class: total_increasing
       mapping:
       mapping:
         - scale: 100
         - scale: 100
 secondary_entities:
 secondary_entities:

+ 1 - 1
custom_components/tuya_local/devices/cbi_astute_outdoor_smartswitch.yaml

@@ -48,7 +48,7 @@ secondary_entities:
         name: sensor
         name: sensor
         type: integer
         type: integer
         unit: Wh
         unit: Wh
-        class: measurement
+        class: total_increasing
         force: true
         force: true
         optional: true
         optional: true
   - entity: sensor
   - entity: sensor

+ 1 - 1
custom_components/tuya_local/devices/dts238_7_energy_meter.yaml

@@ -11,7 +11,7 @@ primary_entity:
       type: integer
       type: integer
       name: sensor
       name: sensor
       unit: kWh
       unit: kWh
-      class: measurement
+      class: total_increasing
       mapping:
       mapping:
         - scale: 100
         - scale: 100
     - id: 6
     - id: 6

+ 6 - 6
custom_components/tuya_local/devices/matsee_2way_energymeter.yaml

@@ -11,7 +11,7 @@ primary_entity:
       type: integer
       type: integer
       name: sensor
       name: sensor
       unit: kWh
       unit: kWh
-      class: measurement
+      class: total_increasing
       mapping:
       mapping:
         - scale: 100
         - scale: 100
 secondary_entities:
 secondary_entities:
@@ -23,7 +23,7 @@ secondary_entities:
         type: integer
         type: integer
         name: sensor
         name: sensor
         unit: kWh
         unit: kWh
-        class: measurement
+        class: total_increasing
         mapping:
         mapping:
           - scale: 100
           - scale: 100
   - entity: sensor
   - entity: sensor
@@ -69,7 +69,7 @@ secondary_entities:
         type: integer
         type: integer
         name: sensor
         name: sensor
         unit: kWh
         unit: kWh
-        class: measurement
+        class: total_increasing
         mapping:
         mapping:
           - scale: 100
           - scale: 100
       - id: 119
       - id: 119
@@ -86,7 +86,7 @@ secondary_entities:
         type: integer
         type: integer
         name: sensor
         name: sensor
         unit: kWh
         unit: kWh
-        class: measurement
+        class: total_increasing
         mapping:
         mapping:
           - scale: 100
           - scale: 100
       - id: 127
       - id: 127
@@ -103,7 +103,7 @@ secondary_entities:
         type: integer
         type: integer
         name: sensor
         name: sensor
         unit: kWh
         unit: kWh
-        class: measurement
+        class: total_increasing
         mapping:
         mapping:
           - scale: 100
           - scale: 100
       - id: 125
       - id: 125
@@ -120,7 +120,7 @@ secondary_entities:
         type: integer
         type: integer
         name: sensor
         name: sensor
         unit: kWh
         unit: kWh
-        class: measurement
+        class: total_increasing
         mapping:
         mapping:
           - scale: 100
           - scale: 100
       - id: 128
       - id: 128