Просмотр исходного кода

Add support for Lefant N3 vacuums

Issue #1393
Jason Rumney 2 лет назад
Родитель
Сommit
d2ccdafb78
3 измененных файлов с 307 добавлено и 2 удалено
  1. 2 2
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 304 0
      custom_components/tuya_local/devices/lefant_n3_vacuum.yaml

+ 2 - 2
ACKNOWLEDGEMENTS.md

@@ -231,7 +231,7 @@ Further device support has been made with the assistance of users. Please consid
 - [Die-Meester](https://github.com/Die-Meester) for contributing support for CBI Astute smart switches.
 - [ResteNarquois](https://github.com/ResteNarquois) for assisting with support for Zemismart roller shades.
 - [grangoni](https://github.com/grangoni) for contributing support for PH-W218 water quality monitors.
-- [antonio1475](https://github.com/antonio1475) for contributing support for Rojeco pet feeders and assisting with support for Mellerware vacuums.
+- [antonio1475](https://github.com/antonio1475) for contributing support for Rojeco pet feeders and assisting with support for Mellerware and Lefant N3 vacuums.
 - [erelke](https://github.com/erelke) for contributing Hungarian translations and support for EARU breakers, simple contact sensor, simple gate opener, and smart siren alarms.
 - [p-owerscripter](https://github.com/p-owerscripter) for contributing support for KKMoon air quality monitors.
 - [cataseven](https://github.com/cataseven) for contributing support for SM07-8 sprinkler controllers.
@@ -305,7 +305,7 @@ Further device support has been made with the assistance of users. Please consid
 - [mild-delirium](https://github.com/mild-delirium) for contributing a bugfix for polling devices.
 - [jorgejavier2321](https://github.com/jorgejavier2321) for assisting with support for Mantra ceiling fans.
 - [diystu](https://github.com/diystu) for assisting with support for Aulifants SMES200 breaker switch.
-- [mariustt](https://github.com/mariustt) for assisting with support for Tampa LED lighting system.
+- [mariustt](https://github.com/mariustt) for assisting with support for Tampa LED lighting system and Lefant N3 vacuum.
 - [prunes-git](https://github.com/prunes-git) for contributing support for Tontine electric blankets.
 - [jrotenstein](https://github.com/jrotenstein) for contributing support for Aquatech Rapid X6 water heaters.
 - [hanzwo](https://github.com/hanzwo) for contributing support for Windcalm ceiling fans.

+ 1 - 0
DEVICES.md

@@ -500,6 +500,7 @@ of device.
 - Kyvol E30 vacuum cleaner
 - Lefant LS1 Pro vacuum cleaner
 - Lefant M213 vacuum cleaner (also works for Lefant M213S and APOSEN A550)
+- Lefant N33 vacuum cleaner
 - Lenovo E1 vacuum cleaner
 - Liectroux XR500[T3]
 - Lubluelu SL60D vacuum cleaner with mop

+ 304 - 0
custom_components/tuya_local/devices/lefant_n3_vacuum.yaml

@@ -0,0 +1,304 @@
+name: Robot vacuum
+products:
+  - id: yn442adgwn5ffqmz
+    name: Lefant N3
+  - id: jtna6ihybmr0mxg8
+    name: Lefant N3
+primary_entity:
+  entity: vacuum
+  dps:
+    - id: 1
+      name: activate
+      type: boolean
+    - id: 4
+      name: command
+      type: string
+      mapping:
+        - dps_val: smart
+          value: clean
+        - dps_val: chargego
+          value: return_to_base
+        - dps_val: zone
+          value: clean_zone
+        - dps_val: pose
+          value: clean_spot
+        - dps_val: part
+          value: clean_partial
+        - dps_val: fastmapping
+          value: map
+        - dps_val: CleanModeSectorbased
+          value: clean_sector
+    - id: 5
+      name: status
+      type: string
+      mapping:
+        - dps_val: standby
+          value: standby
+        - dps_val: smart
+          value: cleaning
+        - dps_val: zone_clean
+          value: cleaning
+        - dps_val: part_clean
+          value: cleaning
+        - dps_val: cleaning
+          value: cleaning
+        - dps_val: paused
+          value: paused
+        - dps_val: goto_pos
+          value: positioning
+        - dps_val: pos_arrived
+          value: at_position
+        - dps_val: pos_unarrive
+          value: cannot_find_position
+        - dps_val: goto_charge
+          value: returning
+        - dps_val: charging
+          value: charging
+        - dps_val: charge_done
+          value: charged
+        - dps_val: sleep
+          value: sleep
+        - dps_val: relocating
+          value: positioning
+        - dps_val: relocating_recharge
+          value: returning
+        - dps_val: recharing_paused
+          value: paused
+        - dps_val: fastmaping
+          value: mapping
+        - dps_val: fastmaping_paused
+          value: paused
+    - id: 9
+      name: fan_speed
+      type: string
+      mapping:
+        - dps_val: closed
+          value: "off"
+        - dps_val: gentle
+          value: low
+        - dps_val: normal
+          value: medium
+        - dps_val: strong
+          value: high
+        - dps_val: superstrong
+          value: turbo
+    - id: 11
+      type: boolean
+      name: locate
+      optional: true
+    - id: 12
+      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: 14
+      name: path_data
+      type: string
+      optional: true
+    - id: 15
+      name: command_trans
+      type: string
+      optional: true
+    - id: 16
+      name: request
+      type: string
+      optional: true
+    - id: 28
+      type: bitfield
+      name: error
+    - id: 32
+      type: string
+      optional: true
+      name: schedule
+    - id: 33
+      type: string
+      optional: true
+      name: do_not_disturb_schedule
+    - id: 101
+      type: string
+      optional: true
+      name: forbidden_zone
+    - id: 102
+      type: string
+      optional: true
+      name: clean_zone
+    - id: 103
+      type: string
+      optional: true
+      name: pos_clean
+    - id: 104
+      type: string
+      optional: true
+      name: all_zone
+    - id: 105
+      type: string
+      optional: true
+      name: map_zoom_android
+    - id: 106
+      type: string
+      optional: true
+      name: map_zoom_ios
+    - id: 107
+      type: string
+      optional: true
+      name: dev_log_show
+    - id: 108
+      type: boolean
+      optional: true
+      name: returning_from_zone
+    - id: 109
+      type: boolean
+      optional: true
+      name: returning_from_spot
+    - id: 110
+      type: string
+      optional: true
+      name: device_info
+    - id: 111
+      type: string
+      optional: true
+      name: robot_log
+    - id: 112
+      type: string
+      optional: true
+      name: map_save
+    - id: 120
+      type: string
+      optional: true
+      name: voice_check
+    - id: 121
+      type: string
+      optional: true
+      name: robot_reboot
+    - id: 123
+      type: string
+      optional: true
+      name: do_not_disturb_settings
+    - id: 124
+      type: boolean
+      optional: true
+      name: scheduled_clean
+    - id: 126
+      type: boolean
+      name: map_saved
+secondary_entities:
+  - entity: button
+    name: Start
+    icon: "mdi:play"
+    category: config
+    dps:
+      - id: 1
+        type: boolean
+        name: button
+  - entity: button
+    name: Pause
+    icon: "mdi:pause"
+    category: config
+    dps:
+      - id: 2
+        type: boolean
+        optional: true
+        name: button
+  - entity: button
+    name: Dock
+    category: config
+    dps:
+      - id: 3
+        type: boolean
+        optional: true
+        name: button
+  - entity: sensor
+    name: Clean time
+    class: duration
+    category: diagnostic
+    dps:
+      - id: 6
+        type: integer
+        name: sensor
+        unit: min
+        class: measurement
+  - entity: sensor
+    name: Cleaned area
+    category: diagnostic
+    icon: "mdi:floor-plan"
+    dps:
+      - id: 7
+        type: integer
+        name: sensor
+        unit: m2
+        class: measurement
+  - entity: sensor
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 8
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+  - entity: select
+    name: Mopping
+    icon: "mdi:cup-water"
+    category: config
+    dps:
+      - id: 10
+        type: string
+        name: option
+        mapping:
+          - dps_val: closed
+            value: "off"
+          - dps_val: low
+            value: low
+          - dps_val: middle
+            value: medium
+          - dps_val: high
+            value: high
+  - entity: button
+    name: Map reset
+    class: restart
+    category: config
+    dps:
+      - id: 13
+        type: boolean
+        name: button
+        optional: true
+  - entity: switch
+    name: Intermittent cleaning
+    icon: "mdi:clock-outline"
+    category: config
+    dps:
+      - id: 27
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Carpet booster
+    icon: "mdi:rug"
+    category: config
+    dps:
+      - id: 45
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Save maps
+    category: config
+    dps:
+      - id: 122
+        type: boolean
+        name: switch
+  - entity: binary_sensor
+    class: battery_charging
+    category: diagnostic
+    dps:
+      - id: 125
+        type: boolean
+        name: sensor