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

Dongguan garage door: add voice switch

Issue #2389
Jason Rumney 1 год назад
Родитель
Сommit
dbdd17e458

+ 25 - 8
custom_components/tuya_local/devices/dongguan_garage_door_opener.yaml

@@ -33,13 +33,12 @@ secondary_entities:
     category: config
     dps:
       - id: 2
-        <<: &timer
-          type: integer
-          name: value
-          unit: s
-          range:
-            min: 0
-            max: 86400
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 0
+          max: 86400
   - entity: number
     name: Run times
     icon: mdi:timer
@@ -58,7 +57,25 @@ secondary_entities:
     category: config
     dps:
       - id: 5
-        <<: *timer
+        type: integer
+        name: value
+        unit: s
+        range:
+          min: 0
+          max: 86400
+  - entity: switch
+    name: Voice control
+    icon: "mdi:account-voice"
+    category: config
+    dps:
+      - id: 11
+        type: boolean
+        optional: true
+        name: switch
+        mapping:
+          - dps_val: null
+            value: false
+            hidden: true
   - entity: sensor
     name: Fault
     icon: mdi:alert