Bläddra i källkod

feat(smartplugv2_energy): mark "Energy" as a proper energy sensor

This was originally given a measurement state class and no class to
reflect that it is generally not useful for energy dashboard use with
most Tuya smartplugs.

But now it is hidden by default, so allow users to use it as an energy
sensor if they enable it in their installation, for those rare devices
that actually work properly.

PR #4723
Jason Rumney 2 månader sedan
förälder
incheckning
fd5297fbce
1 ändrade filer med 5 tillägg och 2 borttagningar
  1. 5 2
      custom_components/tuya_local/devices/smartplugv2_energy.yaml

+ 5 - 2
custom_components/tuya_local/devices/smartplugv2_energy.yaml

@@ -21,6 +21,9 @@ products:
   - id: pq860vo9ib50jhud
   - id: pq860vo9ib50jhud
     manufacturer: Positivo
     manufacturer: Positivo
     model: 10A CTD
     model: 10A CTD
+  - id: i4fg8sszym1rtqz7
+    manufacturer: Voltcraft
+    model: SEM6500
 entities:
 entities:
   - entity: switch
   - entity: switch
     class: outlet
     class: outlet
@@ -63,13 +66,13 @@ entities:
   - entity: sensor
   - entity: sensor
     category: diagnostic
     category: diagnostic
     hidden: true
     hidden: true
-    name: Energy
+    class: energy
     dps:
     dps:
       - id: 17
       - id: 17
         name: sensor
         name: sensor
         type: integer
         type: integer
         unit: Wh
         unit: Wh
-        class: measurement
+        class: total_increasing
         optional: true
         optional: true
       - id: 25
       - id: 25
         type: integer
         type: integer