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

Added Realme TechLife Robot Vacuum (#4293)

* Added Realme TechLife Robot Vacuum cleaner

* feat (realme_techlife_vacuum): changes from review

- naming correction (filename, device/products split)
- use new translation for filter_life, rename similar entities to match
- use mop_fitted dp to filter some other entities and options
- use existing translations for language, with just 1 additional child voice
- split mopping mode out to a separate select entity

PR #4293

* fix (realme_techlife_vacuum): use correct dp name for select

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Dmitriy Kuts 4 недель назад
Родитель
Сommit
0db9bdb28d
1 измененных файлов с 340 добавлено и 0 удалено
  1. 340 0
      custom_components/tuya_local/devices/realme_techlife_vacuum.yaml

+ 340 - 0
custom_components/tuya_local/devices/realme_techlife_vacuum.yaml

@@ -0,0 +1,340 @@
+name: Robot vacuum
+products:
+  - id: aayuntqnrmc7jnq9
+    manufacturer: Realme
+    model: TechLife
+    model_id: P058-T3
+entities:
+  - entity: vacuum
+    dps:
+      - id: 101
+        name: activate
+        type: boolean
+      - id: 102
+        name: pause
+        type: boolean
+        hidden: true
+      - id: 104
+        name: command
+        type: string
+        optional: true
+        mapping:
+          - constraint: pause
+            conditions:
+              - dps_val: true
+                value: pause
+              - dps_val: false
+                mapping:
+                  - dps_val: smart
+                    value: smart
+                  - dps_val: pose
+                    value: clean_spot
+                  - dps_val: zone
+                    value: zone
+                  - dps_val: backcharge
+                    value: return_to_base
+                  - dps_val: curpointing
+                    value: curpointing
+                  - dps_val: selectroom
+                    value: selectroom
+                  - dps_val: null
+                    value: pause
+                    hidden: true
+      - id: 105
+        name: status
+        type: string
+        mapping:
+          - dps_val: idle
+            value: standby
+          - dps_val: pointing
+            value: pointing
+          - dps_val: totaling
+            value: cleaning
+          - dps_val: sweep
+            value: sweep
+          - dps_val: mop
+            value: mop
+          - dps_val: fault
+            value: error
+          - dps_val: pause
+            value: paused
+          - dps_val: chargring
+            value: charging
+          - dps_val: tocharge
+            value: returning
+          - dps_val: fullcharge
+            value: charged
+          - dps_val: remotectl
+            value: remotectl
+          - dps_val: dormant
+            value: dormant
+          - dps_val: curpointing
+            value: curpointing
+          - dps_val: selectroom
+            value: selectroom
+      - id: 109
+        name: fan_speed
+        type: string
+        mapping:
+          - dps_val: mop
+            value: mop
+          - dps_val: quiet
+            value: quiet
+          - dps_val: auto
+            value: normal
+          - dps_val: strong
+            value: turbo
+          - dps_val: max
+            value: max
+      - id: 111
+        name: direction_control
+        optional: true
+        type: string
+        mapping:
+          - dps_val: forward
+            value: forward
+          - dps_val: backward
+            value: backward
+          - dps_val: left
+            value: left
+          - dps_val: right
+            value: right
+          - dps_val: stop
+            value: stop
+      - id: 112
+        name: locate
+        optional: true
+        type: boolean
+      - id: 123
+        name: path_comm
+        optional: true
+        type: string
+      - id: 124
+        name: cmd_comm
+        optional: true
+        type: string
+      - id: 125
+        name: request_data
+        optional: true
+        type: string
+      - id: 126
+        name: comm_flag
+        optional: true
+        type: string
+      - id: 127
+        name: comm_raw
+        optional: true
+        type: string
+      - id: 128
+        name: message_report
+        optional: true
+        type: string
+      - id: 130
+        name: sn
+        optional: true
+        type: string
+      - id: 131
+        name: uuid
+        optional: true
+        type: string
+      - id: 132
+        name: device_info
+        optional: true
+        type: string
+      - id: 137
+        name: auto_boost
+        type: boolean
+      - id: 139
+        name: mopping_path
+        type: boolean
+      - id: 144
+        name: сustomized_mode
+        type: boolean
+        optional: true
+        hidden: true
+  - entity: select
+    translation_key: mode
+    category: config
+    dps:
+      - id: 3
+        optional: true
+        name: option
+        type: string
+        mapping:
+          - dps_val: standby
+            value: standby
+          - dps_val: random
+            value: random
+          - dps_val: smart
+            value: smart
+          - dps_val: wall_follow
+            value: cleaning
+          - dps_val: mop
+            value: mop
+            available: mop_available
+          - dps_val: spiral
+            value: spiral
+          - dps_val: left_spiral
+            value: left_spiral
+          - dps_val: right_spiral
+            value: right_spiral
+          - dps_val: right_bow
+            value: right_bow
+          - dps_val: left_bow
+            value: left_bow
+          - dps_val: partial_bow
+            value: partial_bow
+          - dps_val: chargego
+            value: chargego
+      - id: 138
+        type: boolean
+        name: mop_available
+  - entity: select
+    translation_key: mopping
+    dps:
+      - id: 110
+        name: option
+        type: string
+        mapping:
+          - dps_val: close
+            value: "off"
+          - dps_val: low
+            value: low
+          - dps_val: mid
+            value: medium
+          - dps_val: high
+            value: high
+      - id: 138
+        type: boolean
+        name: available
+  - entity: switch
+    name: Charge switch
+    category: config
+    icon: "mdi:power-plug"
+    dps:
+      - id: 103
+        name: switch
+        type: boolean
+  - entity: sensor
+    class: battery
+    dps:
+      - id: 106
+        type: integer
+        name: sensor
+        unit: "%"
+  - entity: sensor
+    name: Current clean time
+    category: diagnostic
+    class: duration
+    icon: "mdi:clock-outline"
+    dps:
+      - id: 107
+        name: sensor
+        type: integer
+        unit: s
+  - entity: sensor
+    name: Current clean area
+    class: area
+    category: diagnostic
+    dps:
+      - id: 108
+        name: sensor
+        type: integer
+        unit: m2
+  - entity: switch
+    translation_key: do_not_disturb
+    category: config
+    icon: "mdi:bell-ring"
+    dps:
+      - id: 113
+        name: switch
+        type: boolean
+  - entity: number
+    translation_key: volume
+    category: config
+    dps:
+      - id: 114
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 10
+  - entity: sensor
+    name: Total clean time
+    category: diagnostic
+    class: duration
+    icon: "mdi:clock-outline"
+    dps:
+      - id: 116
+        name: sensor
+        type: integer
+        unit: s
+  - entity: sensor
+    name: Total clean area
+    class: area
+    category: diagnostic
+    dps:
+      - id: 117
+        name: sensor
+        type: integer
+        unit: m2
+  - entity: sensor
+    name: Total clean count
+    category: diagnostic
+    icon: "mdi:counter"
+    dps:
+      - id: 118
+        name: sensor
+        type: integer
+  - entity: sensor
+    name: Side brush time
+    category: diagnostic
+    class: duration
+    icon: "mdi:clock-outline"
+    dps:
+      - id: 119
+        name: sensor
+        optional: true
+        type: integer
+        unit: s
+  - entity: sensor
+    name: Main brush life
+    category: diagnostic
+    class: duration
+    icon: "mdi:clock-outline"
+    dps:
+      - id: 120
+        name: sensor
+        type: integer
+        unit: s
+  - entity: sensor
+    translation_key: filter_life
+    category: diagnostic
+    class: duration
+    dps:
+      - id: 121
+        name: sensor
+        optional: true
+        type: integer
+        unit: s
+  - entity: select
+    translation_key: language
+    category: config
+    dps:
+      - id: 133
+        type: integer
+        name: option
+        mapping:
+          - dps_val: 0
+            value: chinese
+          - dps_val: 1
+            value: english
+          - dps_val: 2
+            value: english_child
+  - entity: binary_sensor
+    name: Mop attached
+    category: diagnostic
+    dps:
+      - id: 138
+        type: boolean
+        name: sensor