Browse Source

smartplugv2_energy: make energy and test_bit dps optional

Energy is sent infrequently by many plugs, so don't require it.
Test bit is not really needed, like calibration dps, so don't require it.

The only definite difference now between this and the simpler smartplugv2 is the
Initial State selector.  Overcharge cutoff and Energy sensor are still there,
but optional.
Jason Rumney 3 years ago
parent
commit
520cdf0949
1 changed files with 2 additions and 0 deletions
  1. 2 0
      custom_components/tuya_local/devices/smartplugv2_energy.yaml

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

@@ -9,6 +9,7 @@ primary_entity:
     - id: 21
       type: integer
       name: test_bit
+      optional: true
     - id: 26
       type: bitfield
       name: fault_code
@@ -45,6 +46,7 @@ secondary_entities:
         name: sensor
         type: integer
         unit: Wh
+        optional: true
       - id: 25
         type: integer
         name: calibration