소스 검색

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 년 전
부모
커밋
cefb7dae75
1개의 변경된 파일19개의 추가작업 그리고 37개의 파일을 삭제
  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