소스 검색

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
       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