浏览代码

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 年之前
父节点
当前提交
520cdf0949
共有 1 个文件被更改,包括 2 次插入 和 0 次删除
  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
     - 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