Просмотр исходного кода

smartswitchv1: add optional overcurrent detection

This matches Gosund EP2 plugs.

Avoids creation of new config in PR #592
Jason Rumney 2 лет назад
Родитель
Сommit
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
 legacy_type: kogan_switch
+products:
+  - id: 370053454855194e5607
+    name: Gosund EP2
 primary_entity:
   entity: switch
   class: outlet
@@ -42,6 +45,18 @@ secondary_entities:
         unit: W
         mapping:
           - 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
     category: config
     icon: "mdi:timer"