فهرست منبع

Add support for Lenovo E1 vacuum

Issue #537
Jason Rumney 2 سال پیش
والد
کامیت
dbf8fdbcae
3فایلهای تغییر یافته به همراه227 افزوده شده و 1 حذف شده
  1. 2 1
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 224 0
      custom_components/tuya_local/devices/lenovo_e1_vacuum.yaml

+ 2 - 1
ACKNOWLEDGEMENTS.md

@@ -219,4 +219,5 @@ Further device support has been made with the assistance of users.  Please consi
 - [yarosman](https://github.com/yarosman) for contributing Avatto WT81 support, which was merged with the Beok TGR81.
 - [endrumaj](https://github.com/endrumaj) for assisting with support for Treatlife DS03 ceiling fans with lights.
 - [fjvva](https://github.com/fjvva) for assisting with support for eMylo smart meters.
-- [AdamB2023](https://github.com/AdamB2023) for assistaing with support for Klarta Humea humidifiers.
+- [AdamB2023](https://github.com/AdamB2023) for assisting with support for Klarta Humea humidifiers.
+- [M4R7IN5](https://github.com/M4R7IN5) for assisting with support for Lenovo E1 vacuum cleaners.

+ 1 - 0
DEVICES.md

@@ -297,6 +297,7 @@ of device.
 - Kabum Smart 500 vacuum cleaner
 - Kyvol E30 vacuum cleaner
 - Lefant M213 vacuum cleaner (also works for Lefant M213S and APOSEN A550)
+- Lenovo E1 vacuum cleaner
 
 ### Lawnmowers
 

+ 224 - 0
custom_components/tuya_local/devices/lenovo_e1_vacuum.yaml

@@ -0,0 +1,224 @@
+name: Lenovo E1 vacuum
+products:
+  - id: lec6zthbnidtvk2g
+    name: Lenovo E1
+primary_entity:
+  entity: vacuum
+  dps:
+    - id: 1
+      type: boolean
+      name: power
+    - id: 17
+      type: bitfield
+      name: error
+      mapping:
+        - dps_val: 1
+          value: cliff
+        - dps_val: 2
+          value: impact
+        - dps_val: 4
+          value: wheel
+        - dps_val: 8
+          value: brush
+        - dps_val: 16
+          value: fan
+        - dps_val: 32
+          value: roller_brush
+        - dps_val: 64
+          value: low_power
+        - dps_val: 128
+          value: give_up
+        - dps_val: 256
+          value: no_dust
+        - dps_val: 512
+          value: none
+    - id: 101
+      type: string
+      name: status
+      mapping:
+        - dps_val: SLEEP
+          value: standby
+        - dps_val: HALTING
+          value: halting
+        - dps_val: CLEANING
+          value: cleaning
+        - dps_val: CLEAN_COMP
+          value: cleaning_complete
+        - dps_val: FIND_STA
+          value: returning
+        - dps_val: CHARGING_STA
+          value: charging
+        - dps_val: CHARGING_DC
+          value: charging
+        - dps_val: CHARG_COMP
+          value: standby
+    - id: 102
+      type: string
+      name: command
+      mapping:
+        - dps_val: clean_auto
+          value: auto
+        - dps_val: clean_random
+          value: random
+        - dps_val: clean_wall
+          value: wall_follow
+        - dps_val: clean_spot
+          value: clean_spot
+        - dps_val: clean_sroom
+          value: clean_room
+        - dps_val: find_sta
+          value: return_to_base
+        - dps_val: "null"
+          value: unknown
+    - id: 104
+      type: string
+      name: fan
+      mapping:
+        - dps_val: FANHALTING
+          value: low
+        - dps_val: FANNORAM
+          value: mid
+        - dps_val: FANMAX
+          value: high
+    - id: 105
+      type: string
+      name: direction_control
+      mapping:
+        - dps_val: MoveForward
+          value: forward
+        - dps_val: MoveBackward
+          value: backward
+        - dps_val: MoveLeft
+          value: left
+        - dps_val: MoveRight
+          value: right
+        - dps_val: stop
+          value: stop
+    - id: 108
+      type: integer
+      name: battery
+    - id: 112
+      type: string
+      name: activate
+      mapping:
+        - dps_val: "0"
+          value: false
+        - dps_val: "1"
+          value: true
+    - id: 116
+      type: boolean
+      name: locate
+      optional: true
+    - id: 118
+      type: integer
+      name: model
+    - id: 119
+      type: integer
+      name: data_sample
+secondary_entities:
+  - entity: sensor
+    name: Clean area
+    category: diagnostic
+    dps:
+      - id: 14
+        type: integer
+        name: sensor
+        unit: m2
+        class: measurement
+  - entity: sensor
+    name: Clean time
+    class: duration
+    category: diagnostic
+    dps:
+      - id: 107
+        type: integer
+        name: sensor
+        unit: min
+  - entity: sensor
+    name: Brush life
+    icon: "mdi:pinwheel"
+    category: diagnostic
+    dps:
+      - id: 109
+        type: integer
+        name: sensor
+        unit: "%"
+  - entity: sensor
+    name: Roller brush life
+    icon: "mdi:tire"
+    category: diagnostic
+    dps:
+      - id: 110
+        type: integer
+        name: sensor
+        unit: "%"
+  - entity: sensor
+    name: HEPA filter life
+    category: diagnostic
+    icon: "mdi:air-filter"
+    dps:
+      - id: 111
+        type: integer
+        name: sensor
+        unit: "%"
+  - entity: button
+    name: Reset brush
+    icon: "mdi:pinwheel"
+    category: config
+    dps:
+      - id: 113
+        type: boolean
+        name: button
+        optional: true
+  - entity: button
+    name: Reset roller brush
+    icon: "mdi:tire"
+    category: config
+    dps:
+      - id: 114
+        type: boolean
+        name: button
+        optional: true
+  - entity: button
+    name: Reset HEPA filter
+    icon: "mdi:air-filter"
+    category: config
+    dps:
+      - id: 115
+        type: boolean
+        name: button
+        optional: trus
+  - entity: select
+    name: Scheduled clean
+    icon: "mdi:robot-vacuum"
+    category: config
+    dps:
+      - id: 117
+        type: string
+        name: option
+        mapping:
+          - dps_val: clean_auto
+            value: auto
+          - dps_val: clean_random
+            value: random
+          - dps_val: clean_wall
+            value: wall
+          - dps_val: clean_spot
+            value: spot
+          - dps_val: find_sta
+            value: dock
+  - entity: select
+    name: Mopping
+    icon: "mdi:format-color-fill"
+    category: config
+    dps:
+      - id: 120
+        type: string
+        name: option
+        mapping:
+          - dps_val: water_small 
+            value: Low
+          - dps_val: water_big
+            value: High
+          - dps_val: water_auto
+            value: Auto