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

Add support for Mellerware City Move vacuum

Issue #584

Based on the report, this only reports dp 1, so there is high
possibility of mismatch with other devices (possibly vacuums, which
may be confusing)
Jason Rumney 2 лет назад
Родитель
Сommit
84422fdeda

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -231,7 +231,7 @@ Further device support has been made with the assistance of users.  Please consi
 - [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.
+- [antonio1475](https://github.com/antonio1475) for contributing support for Rojeco pet feeders and assisting with support for Mellerware vacuums.
 - [erelke](https://github.com/erelke) for contributing Hungarian translations.
 - [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.

+ 1 - 0
DEVICES.md

@@ -319,6 +319,7 @@ of device.
 - Kyvol E30 vacuum cleaner
 - Lefant M213 vacuum cleaner (also works for Lefant M213S and APOSEN A550)
 - Lenovo E1 vacuum cleaner
+- Mellerware City Move vacuum cleaner (high likelihood of mismatch)
 
 ### Lawnmowers
 

+ 229 - 0
custom_components/tuya_local/devices/mellerware_citymove_vacuum.yaml

@@ -0,0 +1,229 @@
+name: Mellerware vacuum
+products:
+  - id: sayafukjeqp9kupy
+    name: Mellerware City Move
+primary_entity:
+  entity: vacuum
+  dps:
+    - id: 1
+      type: boolean
+      name: power
+    - id: 17
+      type: bitfield
+      name: error
+      optional: true
+      mapping:
+        - dps_val: [ null, 0 ]
+          value: OK
+        - dps_val: 1
+          value: cliff
+        - dps_val: 2
+          value: imp
+        - dps_val: 4
+          value: whl
+        - 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
+      optional: true
+      mapping:
+        - dps_val: [ null, SLEEP, CHARG_COMP ]
+          value: standby
+        - dps_val: HALTING
+          value: paused
+        - dps_val: CLEANING
+          value: cleaning
+        - dps_val: CLEAN_COMP
+          value: cleaning_complete
+        - dps_val: FIND_STA
+          value: returning
+        - dps_val: [ CHARGING_STA, CHARGING_DC ]
+          value: charging
+    - id: 102
+      type: string
+      name: command
+      optional: true
+      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
+    - id: 104
+      type: string
+      name: fan_speed
+      optional: true
+      mapping:
+        - dps_val: FANHALTING
+          value: Low
+        - dps_val: FANNORAM
+          value: Medium
+        - dps_val: FANMAX
+          value: High
+    - id: 105
+      type: string
+      name: direction_control
+      optional: true
+      mapping:
+        - dps_val: MoveForward
+          value: forward
+        - dps_val: MoveBackward
+          value: reverse
+        - dps_val: MoveLeft
+          value: left
+        - dps_val: MoveRight
+          value: right
+        - dps_val: stop
+          value: stop
+    - id: 108
+      type: integer
+      name: battery
+      optional: true
+    - id: 112
+      type: string
+      name: activate
+      optional: true
+      mapping:
+        - dps_val: "0"
+          value: false
+        - dps_val: "1"
+          value: true
+    - id: 116
+      type: boolean
+      name: locate
+      optional: true
+    - id: 117
+      type: string
+      name: program
+      optional: true
+    - id: 118
+      type: integer
+      name: model
+      optional: true
+    - id: 119
+      type: integer
+      name: data_sample
+      optional: true
+secondary_entities:
+  - entity: sensor
+    name: Clean area
+    category: diagnostic
+    icon: "mdi:floor-plan"
+    dps:
+      - id: 14
+        type: integer
+        name: sensor
+        unit: m2
+        optional: true
+        mapping:
+          - scale: 10
+  - entity: sensor
+    name: Clean time
+    class: duration
+    category: diagnostic
+    icon: "mdi:clock-outline"
+    dps:
+      - id: 107
+        type: integer
+        name: sensor
+        unit: min
+        optional: true
+  - entity: sensor
+    name: Brush remaining
+    category: diagnostic
+    icon: "mdi:arrow-expand-all"
+    dps:
+      - id: 109
+        type: integer
+        name: sensor
+        unit: "%"
+        optional: true
+  - entity: sensor
+    name: Roller brush remaining
+    category: diagnostic
+    icon: "mdi:circle"
+    dps:
+      - id: 110
+        type: integer
+        name: sensor
+        unit: "%"
+        optional: true
+  - entity: sensor
+    name: HEPA filter remaining
+    category: diagnostic
+    icon: "mdi:air-filter"
+    dps:
+      - id: 111
+        type: integer
+        name: sensor
+        unit: "%"
+        optional: true
+  - entity: button
+    name: Reset brush
+    class: restart
+    category: config
+    dps:
+      - id: 113
+        type: boolean
+        name: button
+        optional: true
+  - entity: button
+    name: Reset roller brush
+    class: restart
+    category: config
+    dps:
+      - id: 114
+        type: boolean
+        name: button
+        optional: true
+  - entity: button
+    name: Reset HEPA filter
+    category: config
+    class: restart
+    dps:
+      - id: 115
+        type: boolean
+        name: button
+        optional: true
+  - entity: select
+    name: Scheduled task
+    icon: "mdi:calendar-clock"
+    category: config
+    dps:
+      - id: 117
+        type: string
+        name: option
+        optional: true
+        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