Ver código fonte

fix (airrobo_p20_vacuum): cherrypicked improvements from PR #3714

- use standard `stop` command rather than `standby`
- differentiate different "cleaning" statuses
   - these are merged to "cleaning" for entity state, but can be more detailed
     in the status attribute
- hide the error entity. There is a separate problem sensor for this
- use `fault_code` rather than `error` on the problem sensor for consistency with other devices

Other changes from PR #3714 not included here affect backwards compatibility
Jason Rumney 5 meses atrás
pai
commit
7e50244ba4

+ 7 - 6
custom_components/tuya_local/devices/airrobo_p20_vacuum.yaml

@@ -15,7 +15,7 @@ entities:
         name: command
         name: command
         mapping:
         mapping:
           - dps_val: standby
           - dps_val: standby
-            value: standby
+            value: stop
           - dps_val: smart
           - dps_val: smart
             value: smart
             value: smart
           - dps_val: wall_follow
           - dps_val: wall_follow
@@ -45,13 +45,13 @@ entities:
           - dps_val: standby
           - dps_val: standby
             value: idle
             value: idle
           - dps_val: smart_clean
           - dps_val: smart_clean
-            value: cleaning
+            value: auto
           - dps_val: wall_clean
           - dps_val: wall_clean
-            value: cleaning
+            value: edge
           - dps_val: spot_clean
           - dps_val: spot_clean
-            value: cleaning
+            value: spot
           - dps_val: mop_clean
           - dps_val: mop_clean
-            value: cleaning
+            value: mopping
           - dps_val: goto_charge
           - dps_val: goto_charge
             value: returning
             value: returning
           - dps_val: charging
           - dps_val: charging
@@ -82,6 +82,7 @@ entities:
         type: bitfield
         type: bitfield
         name: error
         name: error
         optional: true
         optional: true
+        hidden: true
       - id: 104
       - id: 104
         type: string
         type: string
         name: serial_number
         name: serial_number
@@ -195,7 +196,7 @@ entities:
           - value: true
           - value: true
       - id: 18
       - id: 18
         type: bitfield
         type: bitfield
-        name: error
+        name: fault_code
         optional: true
         optional: true
       - id: 18
       - id: 18
         type: bitfield
         type: bitfield