Przeglądaj źródła

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 lat temu
rodzic
commit
520cdf0949

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

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