Przeglądaj źródła

TTEC vacuum: remap pause to activate and use command directly.

An activate dp is required to start/pause the vacuum if there is no
start and pause command in the command dp.  We had followed the tuya
naming of this as "pause" to integrate the pause command into the
command dp, but there is still no "start" command.  It is better to
separate it back out and reverse the logic to make it an "activate" dp.

Issue #1545
Jason Rumney 2 lat temu
rodzic
commit
cefb7dae75

+ 19 - 37
custom_components/tuya_local/devices/ttec_reobipro_vacuum.yaml

@@ -16,49 +16,31 @@ primary_entity:
     - id: 2
     - id: 2
       type: boolean
       type: boolean
       optional: true
       optional: true
-      name: command
+      name: activate
       mapping:
       mapping:
         - dps_val: true
         - dps_val: true
-          value: pause
+          value: false
         - dps_val: false
         - dps_val: false
-          constraint: mode
-          conditions:
-            - dps_val: smart
-              value: smart
-            - dps_val: chargego
-              value: return_to_base
-            - dps_val: zone
-              value: zone
-            - dps_val: pose
-              value: clean_spot
-            - dps_val: part
-              value: partial
-            - dps_val: selectroom
-              value: room
+          value: true
         - dps_val: null
         - dps_val: null
-          constraint: mode
-          conditions:
-            - dps_val: smart
-              value: smart
-              hidden: true
-            - dps_val: chargego
-              value: return_to_base
-              hidden: true
-            - dps_val: zone
-              value: zone
-              hidden: true
-            - dps_val: pose
-              value: clean_spot
-              hidden: true
-            - dps_val: part
-              value: partial
-              hidden: true
-            - dps_val: selectroom
-              value: room
-              hidden: true
+          value: false
+          hidden: true
     - id: 4
     - id: 4
       type: string
       type: string
-      name: mode
+      name: command
+      mapping:
+        - dps_val: smart
+          value: smart
+        - dps_val: chargego
+          value: return_to_base
+        - dps_val: zone
+          value: zone
+        - dps_val: pose
+          value: clean_spot
+        - dps_val: part
+          value: partial
+        - dps_val: selectroom
+          value: room
     - id: 5
     - id: 5
       type: string
       type: string
       name: status
       name: status