Parcourir la source

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 il y a 2 ans
Parent
commit
cefb7dae75
1 fichiers modifiés avec 19 ajouts et 37 suppressions
  1. 19 37
      custom_components/tuya_local/devices/ttec_reobipro_vacuum.yaml

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

@@ -16,49 +16,31 @@ primary_entity:
     - id: 2
       type: boolean
       optional: true
-      name: command
+      name: activate
       mapping:
         - dps_val: true
-          value: pause
+          value: 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
-          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
       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
       type: string
       name: status