Bläddra i källkod

Kogan LX8: changes from review and LX10 changes

- keep branding under products
- rearrange pause/command handling
- use two spaces before end of line comments (yamllint)
Jason Rumney 2 år sedan
förälder
incheckning
b0adb2e61c
1 ändrade filer med 19 tillägg och 20 borttagningar
  1. 19 20
      custom_components/tuya_local/devices/kogan_lx8_vacuum.yaml

+ 19 - 20
custom_components/tuya_local/devices/kogan_lx8_vacuum.yaml

@@ -1,35 +1,34 @@
-name: Kogan LX8 Robot Vacuum
+name: Robot vacuum
 products:
   - id: 1bgkj0zbhbw7fppy
-    name: Kogan LX8 Robot Vacuum
+    name: Kogan LX8
 primary_entity:
   entity: vacuum
   dps:
     - id: 101
-      name: activate # clean_switch
+      name: activate  # clean_switch
       type: boolean
     - id: 102
-      name: pause # pause_switch
+      name: command  # pause_switch
       type: boolean
+      mapping:
+        - dps_val: true
+          value: pause
+        - dps_val: false
+          constraint: clean_mode
+          conditions:
+            - dps_val: smart
+              value: smart
+            - dps_val: pose
+              value: clean_spot
+            - dps_val: zone
+              value: zone
+            - dps_val: backcharge
+              value: return_to_base                      
     - id: 104
-      name: command # clean_mode
+      name: clean_mode
       type: string
       optional: true
-      mapping:
-        - constraint: pause
-          conditions:
-            - dps_val: true
-              value: pause
-            - dps_val: false
-              mapping:
-                - dps_val: smart
-                  value: smart
-                - dps_val: pose
-                  value: clean_spot
-                - dps_val: zone
-                  value: zone
-                - dps_val: backcharge
-                  value: return_to_base
     - id: 105
       name: status  # robot_state
       type: string