Преглед изворни кода

Add support for Kabum Smart 700 vacuum cleaner

Issue #944
Jason Rumney пре 2 година
родитељ
комит
577ea957a3
3 измењених фајлова са 277 додато и 0 уклоњено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 275 0
      custom_components/tuya_local/devices/kabum_smart700_vacuum.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -334,3 +334,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [robsonmantovani](https://github.com/robsonmantovani) for contributing support for Marpou ceiling lights.
 - [Brazen00](https://github.com/Brazen00) for contributing support for Holman WX1 tap timers.
 - [nima-002](https://github.com/nima-002) for contributing improvements to Moebot S lawnmowers.
+- [maxupunk](https://github.com/maxupunk) for assistance with support for Kabum Smart 700 vacuum cleaners.

+ 1 - 0
DEVICES.md

@@ -374,6 +374,7 @@ of device.
 ### Vacuum Cleaners
 
 - Kabum Smart 500 vacuum cleaner
+- Kabum Smart 700 vacuum cleaner (also sold as Liectroux XR500 and maybe others)
 - Kogan LX10 vacuum cleaner with mop
 - Kyvol E30 vacuum cleaner
 - Lefant LS1 Pro vacuum cleaner

+ 275 - 0
custom_components/tuya_local/devices/kabum_smart700_vacuum.yaml

@@ -0,0 +1,275 @@
+name: Robot vacuum
+products:
+  - id: pu5cpxucdrdrr21a
+    name: Kabum Smart 700
+primary_entity:
+  entity: vacuum
+  dps:
+    - id: 2
+      type: boolean
+      name: activate
+    - id: 3
+      type: string
+      name: command
+      mapping:
+        - dps_val: smart
+          value: smart
+        - dps_val: zone
+          value: zone
+        - dps_val: pose
+          value: go_to_position
+        - dps_val: part
+          value: clean_spot
+        - dps_val: chargego
+          value: return_to_base
+        - dps_val: wallfollow
+          value: wall_follow
+        - dps_val: selectroom
+          value: select_room
+    - id: 4
+      type: string
+      name: direction_control
+      optional: true
+      mapping:
+        - dps_val: forward
+          value: forward
+        - dps_val: backward
+          value: reverse
+        - dps_val: turn_left
+          value: left
+        - dps_val: turn_right
+          value: right
+        - dps_val: stop
+          value: stop
+    - id: 5
+      type: string
+      name: status
+      mapping:
+        - dps_val: standby
+          value: standby
+        - dps_val: smart_clean
+          value: cleaning
+        - dps_val: zone_clean
+          value: cleaning
+        - dps_val: part_clean
+          value: cleaning
+        - dps_val: paused
+          value: pause
+        - dps_val: goto_pos
+          value: going_to_location
+        - dps_val: pos_arrived
+          value: on_location
+        - dps_val: pos_unarrive
+          value: cannot_find_location
+        - dps_val: to_charge
+          value: returning
+        - dps_val: charging
+          value: charging
+        - dps_val: charge_done
+          value: charged
+        - dps_val: sleep
+          value: sleep
+        - dps_val: fault
+          value: error
+        - dps_val: wall_follow
+          value: wall_follow
+        - dps_val: direction_control
+          value: direction_control
+        - dps_val: selectroom
+          value: select_room
+    - id: 13
+      type: boolean
+      name: locate
+      optional: true
+    - id: 14
+      type: string
+      name: suction
+      mapping:
+        - dps_val: strong
+          value: High
+        - dps_val: normal
+          value: Medium
+        - dps_val: quiet
+          value: Low
+    - id: 18
+      type: bitfield
+      name: error
+      mapping:
+        - dps_val: 2
+          value: left_wheel_hang
+        - dps_val: 4
+          value: main_brush_stuck
+        - dps_val: 8
+          value: right_wheel_hang
+        - dps_val: 16
+          value: left_wheel_stuck
+        - dps_val: 32
+          value: right_wheel_stuck
+        - dps_val: 64
+          value: cliff
+        - dps_val: 128
+          value: side_brush_stuck
+        - dps_val: 512
+          value: collision
+        - dps_val: 1024
+          value: dust_box_stuck
+        - dps_val: 4096
+          value: ground_check_failure
+        - dps_val: 32768
+          value: vacuum_motor_stuck
+        - dps_val: 65536
+          value: high_current
+        - dps_val: 131072
+          value: charge_port_closed
+    - id: 101
+      type: boolean
+      name: pause
+secondary_entities:
+  - entity: sensor
+    class: battery
+    dps:
+      - id: 6
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+  - entity: sensor
+    name: Cleaned area
+    category: diagnostic
+    icon: "mdi:floor-plan"
+    dps:
+      - id: 16
+        type: integer
+        name: sensor
+        unit: m2
+  - entity: sensor
+    name: Cleaning time
+    class: duration
+    category: diagnostic
+    icon: "mdi:clock-outline"
+    dps:
+      - id: 17
+        type: integer
+        name: sensor
+        unit: min
+  - entity: select
+    name: Mop mode
+    icon: "mdi:brush"
+    category: config
+    dps:
+      - id: 102
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: "Off"
+          - dps_val: "1"
+            value: Low
+          - dps_val: "2"
+            value: Standard
+          - dps_val: "3"
+            value: Strong
+  - entity: button
+    name: Reset map
+    category: config
+    dps:
+      - id: 103
+        type: boolean
+        name: button
+        optional: true
+      - id: 104
+        type: string
+        name: map_request
+        optional: true
+      - id: 105
+        type: string
+        name: complex_command
+        optional: true
+      - id: 106
+        type: string
+        name: path_data
+        optional: true
+      - id: 108
+        type: string
+        name: smart_rooms
+        optional: true
+      - id: 109
+        type: bitfield
+        name: rooms_msg
+        optional: true
+        mapping:
+          - dps_val: null
+            value: None
+          - dps_val: 0
+            value: None
+          - dps_val: 1
+            value: split
+          - dps_val: 2
+            value: merger
+          - dps_val: 4
+            value: map
+          - dps_val: 8
+            value: robot_cleaning
+          - dps_val: 16
+            value: active_split
+          - dps_val: 32
+            value: not_by_human
+          - dps_val: 64
+            value: save_fail
+          - dps_val: 128
+            value: split_success
+          - dps_val: 256
+            value: merger_success
+          - dps_val: 512
+            value: choice_no_found
+          - dps_val: 1024
+            value: count_error
+          - dps_val: 2048
+            value: choice_set_ok
+  - entity: switch
+    name: Do not disturb
+    category: config
+    dps:
+      - id: 107
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Break clean
+    category: config
+    icon: "mdi:motion-pause"
+    dps:
+      - id: 110
+        type: boolean
+        name: switch
+  - entity: select
+    name: Voice language
+    icon: "mdi:translate"
+    category: config
+    dps:
+      - id: 111
+        type: string
+        name: option
+        mapping:
+          - dps_val: cn
+            value: 中文
+          - dps_val: en
+            value: English
+  - entity: number
+    name: Volume
+    category: config
+    icon: "mdi:volume-high"
+    dps:
+      - id: 112
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 100
+        unit: "%"
+  - entity: switch
+    name: Y-mopping
+    category: config
+    dps:
+      - id: 113
+        type: boolean
+        name: switch