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

feat (aubess_1gang_switch): add Aubess Smart Switch/EM model

- additional switch_type attribute
- make more dps optional

Issue #4402
Jason Rumney 5 дней назад
Родитель
Сommit
01a6fd0cfd
1 измененных файлов с 17 добавлено и 2 удалено
  1. 17 2
      custom_components/tuya_local/devices/aubess_1gang_switch.yaml

+ 17 - 2
custom_components/tuya_local/devices/aubess_1gang_switch.yaml

@@ -1,7 +1,8 @@
 name: Energy monitor switch
 products:
-  # - id: UNKNOWN
-  #   manufacturer: Aubess
+  - id: labfkgzm2ikdcpdp
+    manufacturer: Aubess
+    model: Smart Switch/EM
   - id: m4jtkjc43ltrilru
     model: T34 Smart Plug+
 entities:
@@ -13,15 +14,23 @@ entities:
       - id: 24
         name: test_bit
         type: integer
+        optional: true
       - id: 42
         name: random_time
         type: string
+        optional: true
       - id: 43
         name: cycle_time
         type: string
+        optional: true
       - id: 44
         name: switch_inching
         type: string
+        optional: true
+      - id: 47
+        type: string
+        name: switch_type
+        optional: true
   - entity: time
     translation_key: timer
     category: config
@@ -53,6 +62,7 @@ entities:
     dps:
       - id: 38
         type: string
+        optional: true
         name: option
         mapping:
           - dps_val: "0"
@@ -75,6 +85,7 @@ entities:
             available: word_values
       - id: 38
         type: string
+        optional: true
         name: numeric_values
         mapping:
           - dps_val: "0"
@@ -86,6 +97,7 @@ entities:
           - value: false
       - id: 38
         type: string
+        optional: true
         name: word_values
         mapping:
           - dps_val: "0"
@@ -113,6 +125,7 @@ entities:
       - id: 21
         name: sensor
         type: integer
+        optional: true
         class: measurement
         force: true
         unit: mA
@@ -123,6 +136,7 @@ entities:
       - id: 22
         name: sensor
         type: integer
+        optional: true
         class: measurement
         force: true
         unit: W
@@ -135,6 +149,7 @@ entities:
       - id: 23
         name: sensor
         type: integer
+        optional: true
         force: true
         class: measurement
         unit: V