소스 검색

smartswitchv1: add optional overcurrent detection

This matches Gosund EP2 plugs.

Avoids creation of new config in PR #592
Jason Rumney 2 년 전
부모
커밋
ee3e883a37
1개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 15 0
      custom_components/tuya_local/devices/smartplugv1.yaml

+ 15 - 0
custom_components/tuya_local/devices/smartplugv1.yaml

@@ -1,5 +1,8 @@
 name: Energy monitoring smartplug
 name: Energy monitoring smartplug
 legacy_type: kogan_switch
 legacy_type: kogan_switch
+products:
+  - id: 370053454855194e5607
+    name: Gosund EP2
 primary_entity:
 primary_entity:
   entity: switch
   entity: switch
   class: outlet
   class: outlet
@@ -42,6 +45,18 @@ secondary_entities:
         unit: W
         unit: W
         mapping:
         mapping:
           - scale: 10
           - scale: 10
+  - entity: binary_sensor
+    name: Overcurrent alarm
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 7
+        type: boolean
+        name: sensor
+        optional: true
+        mapping:
+          - dps_val: null
+            value: false
   - entity: number
   - entity: number
     category: config
     category: config
     icon: "mdi:timer"
     icon: "mdi:timer"