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

Add Honiture G20 and Q6 Pro Robot Vacuum and Mop device profiles (#4989)

* Create honiture_g20_robot_vacuum_mop.yaml

Adds device profile for Honiture G20 robot vacuum with mopping capability.  Includes all three fan speeds (gentle, normal, strong), mopping water  control, battery sensor, cleaning time, and fault code diagnostics.  Tested on hardware with protocol 3.4.

* Update Honiture G20 vacuum configuration

Updated device ID and added new sensor entities for edge brush life, roll brush life, and filter life. Modified existing mappings and values for various commands and statuses.

* Update translation keys for filter life and language

* Add Honiture Q6 Pro Robot Vacuum and Mop device profile

Adds device profile for Honiture Q6 Pro robot vacuum with mopping capability. Includes full robot_state status mapping, fan speeds (quiet, auto, strong, max), mopping water control, battery, brush life sensors, auto boost, mop detection, deep clean, room mode, do not disturb, and volume control. Tested on hardware with protocol 3.3.

* Add translation keys for Do Not Disturb and Volume

* Fix icons, add class: area to cleaning area sensor

Remove redundant icons from sensors where class already defines  the icon (filter_life, cleaning time, brush life sensors). Add  class: area to cleaning area sensor. Capitalize first word only  in work mode option values per HA naming convention.

* Fix icons, add class: area to cleaning area sensor

Remove redundant icons from sensors where class already defines  the icon (filter_life, cleaning time, brush life sensors). Add  class: area to cleaning area sensor. Capitalize first word only  in work mode option values per HA naming convention.

* Fix icons, add class: area to cleaning area sensors

Remove redundant icons from sensors where class already defines the icon (filter_life, clean time, brush life sensors). Add  class: area to current clean area and total clean area sensors.  Remove icon from mop attached and auto boost switches where not  needed.

* Address review feedback on G20 vacuum profile

- Remove branding from top level name per convention - Differentiate cleaning mode status values instead of collapsing all to cleaning - Use standard low/medium/high fan speed values for translation support - Move seek/locate to vacuum entity locate attribute - Use translation_key: filter_reset for reset filter button - Use translation_key: cleaning_mode for work mode select with standard sweep/mop sweep_and_mop values - Lowercase language option values to match translation keys

* Address review feedback on Q6 Pro vacuum profile

- Remove branding from top level name per convention - Differentiate cleaning mode status values instead of collapsing all to cleaning - Map fan speed values to standard low/medium/high/max for translation support

* Fix return to base and add charge switch entity

Remove DP103 from vacuum entity return_to_base as the Q6 Pro firmware does not respond to it correctly. Add DP3 chargego command mapping for return_to_base. Add DP13 locate attribute to vacuum entity. Add DP103 charge_switch as standalone switch entity which is the actual DPS that triggers dock return on this device. The vacuum card home button uses DP3 chargego but the charge_switch entity (DP103) is the reliable method for sending honey to dock.
starfire0606 3 недель назад
Родитель
Сommit
9b68744a28

+ 290 - 0
custom_components/tuya_local/devices/honiture_g20_robot_vacuum_mop.yaml

@@ -0,0 +1,290 @@
+name: Robot vacuum and mop
+products:
+  - id: rxmacvgkaz640r4q
+    manufacturer: Honiture
+    model: G20
+entities:
+  - entity: vacuum
+    dps:
+      - id: 2
+        type: boolean
+        name: activate
+      - id: 3
+        type: string
+        name: command
+        mapping:
+          - dps_val: standby
+            value: stop
+          - dps_val: smart
+            value: clean
+          - dps_val: spiral
+            value: clean_spot
+          - dps_val: wall_follow
+            value: wall_follow
+          - dps_val: chargego
+            value: return_to_base
+          - dps_val: random
+            value: random
+          - dps_val: partial_bow
+            value: partial_bow
+      - 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: smart_clean
+          - dps_val: wall_clean
+            value: wall_clean
+          - dps_val: spot_clean
+            value: spot_clean
+          - dps_val: mop_clean
+            value: mop_clean
+          - dps_val: random_clean
+            value: random_clean
+          - dps_val: cleaning
+            value: cleaning
+          - dps_val: clean_done
+            value: returning
+          - dps_val: goto_charge
+            value: returning
+          - dps_val: charging
+            value: charging
+          - dps_val: charging_dc
+            value: charging
+          - dps_val: charge_done
+            value: charged
+          - dps_val: fault
+            value: error
+          - dps_val: sleep
+            value: sleep
+      - id: 13
+        type: boolean
+        name: locate
+      - id: 14
+        type: string
+        name: fan_speed
+        mapping:
+          - dps_val: gentle
+            value: low
+          - dps_val: normal
+            value: medium
+          - dps_val: strong
+            value: high
+
+  - entity: sensor
+    class: battery
+    dps:
+      - id: 6
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+
+  - entity: sensor
+    name: Edge brush life
+    category: diagnostic
+    dps:
+      - id: 7
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+
+  - entity: sensor
+    name: Roll brush life
+    category: diagnostic
+    dps:
+      - id: 8
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+
+  - entity: sensor
+    translation_key: filter_life
+    category: diagnostic
+    dps:
+      - id: 9
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+
+  - entity: button
+    name: Reset edge brush
+    category: config
+    dps:
+      - id: 10
+        type: boolean
+        name: button
+
+  - entity: button
+    name: Reset roll brush
+    category: config
+    dps:
+      - id: 11
+        type: boolean
+        name: button
+
+  - entity: button
+    translation_key: filter_reset
+    category: config
+    dps:
+      - id: 12
+        type: boolean
+        name: button
+
+  - entity: sensor
+    name: Cleaning area
+    category: diagnostic
+    class: area
+    dps:
+      - id: 16
+        type: integer
+        name: sensor
+        unit: "m²"
+
+  - entity: sensor
+    name: Cleaning time
+    category: diagnostic
+    class: duration
+    dps:
+      - id: 17
+        type: integer
+        name: sensor
+        unit: min
+
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 18
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 18
+        type: bitfield
+        name: fault_code
+      - id: 18
+        type: bitfield
+        name: description
+        mapping:
+          - dps_val: 0
+            value: ok
+          - dps_val: 1
+            value: edge_sweep
+          - dps_val: 2
+            value: middle_sweep
+          - dps_val: 4
+            value: left_wheel
+          - dps_val: 8
+            value: right_wheel
+          - dps_val: 16
+            value: garbage_box
+          - dps_val: 32
+            value: land_check
+          - dps_val: 64
+            value: collision
+
+  - entity: select
+    translation_key: mopping
+    category: config
+    icon: "mdi:cup-water"
+    dps:
+      - id: 20
+        name: option
+        type: string
+        mapping:
+          - dps_val: low
+            value: low
+          - dps_val: middle
+            value: medium
+          - dps_val: high
+            value: high
+
+  - entity: select
+    translation_key: cleaning_mode
+    category: config
+    dps:
+      - id: 24
+        name: option
+        type: string
+        mapping:
+          - dps_val: only_sweep
+            value: sweep
+          - dps_val: only_mop
+            value: mop
+          - dps_val: both_work
+            value: sweep_and_mop
+
+  - entity: switch
+    name: Carpet boost
+    category: config
+    dps:
+      - id: 101
+        type: boolean
+        name: switch
+
+  - entity: switch
+    name: Carpet detection
+    category: config
+    dps:
+      - id: 102
+        type: boolean
+        name: switch
+
+  - entity: select
+    name: Volume
+    category: config
+    dps:
+      - id: 104
+        name: option
+        type: string
+        mapping:
+          - dps_val: vol_mute
+            value: mute
+          - dps_val: vol_normal
+            value: normal
+          - dps_val: vol_max
+            value: max
+
+  - entity: select
+    translation_key: language
+    category: config
+    dps:
+      - id: 105
+        name: option
+        type: string
+        mapping:
+          - dps_val: english
+            value: english
+          - dps_val: german
+            value: german
+          - dps_val: french
+            value: french
+          - dps_val: italian
+            value: italian
+          - dps_val: spanish
+            value: spanish
+          - dps_val: japanese
+            value: japanese

+ 261 - 0
custom_components/tuya_local/devices/honiture_q6_pro_robot_vacuum_mop.yaml

@@ -0,0 +1,261 @@
+name: Robot vacuum and mop
+products:
+  - id: c4ueb7cxlgmfon1t
+    manufacturer: Honiture
+    model: Q6 Pro
+entities:
+  - entity: vacuum
+    dps:
+      - id: 101
+        type: boolean
+        name: activate
+      - id: 102
+        type: boolean
+        name: pause
+        optional: true
+      - id: 3
+        type: string
+        name: command
+        mapping:
+          - dps_val: standby
+            value: stop
+          - dps_val: smart
+            value: clean
+          - dps_val: chargego
+            value: return_to_base
+      - id: 13
+        type: boolean
+        name: locate
+      - id: 105
+        type: string
+        name: status
+        mapping:
+          - dps_val: idle
+            value: standby
+          - dps_val: sweep
+            value: sweep
+          - dps_val: mop
+            value: mop
+          - dps_val: areaing
+            value: areaing
+          - dps_val: totaling
+            value: totaling
+          - dps_val: pointing
+            value: pointing
+          - dps_val: curpointing
+            value: curpointing
+          - dps_val: selectroom
+            value: selectroom
+          - dps_val: remotectl
+            value: remotectl
+          - dps_val: pause
+            value: paused
+          - dps_val: tocharge
+            value: returning
+          - dps_val: chargring
+            value: charging
+          - dps_val: fullcharge
+            value: charged
+          - dps_val: fault
+            value: error
+          - dps_val: dormant
+            value: sleep
+      - id: 109
+        type: string
+        name: fan_speed
+        mapping:
+          - dps_val: quiet
+            value: low
+          - dps_val: auto
+            value: medium
+          - dps_val: strong
+            value: high
+          - dps_val: max
+            value: max
+
+  - entity: sensor
+    class: battery
+    dps:
+      - id: 106
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+
+  - entity: sensor
+    name: Current clean time
+    category: diagnostic
+    class: duration
+    dps:
+      - id: 107
+        type: integer
+        name: sensor
+        unit: s
+
+  - entity: sensor
+    name: Current clean area
+    category: diagnostic
+    class: area
+    dps:
+      - id: 108
+        type: integer
+        name: sensor
+        unit: "m²"
+
+  - entity: select
+    translation_key: mopping
+    category: config
+    icon: "mdi:cup-water"
+    dps:
+      - id: 110
+        name: option
+        type: string
+        mapping:
+          - dps_val: low
+            value: low
+          - dps_val: mid
+            value: medium
+          - dps_val: high
+            value: high
+
+  - entity: switch
+    translation_key: do_not_disturb
+    category: config
+    dps:
+      - id: 113
+        type: boolean
+        name: switch
+
+  - 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
+    dps:
+      - id: 116
+        type: integer
+        name: sensor
+        unit: s
+
+  - entity: sensor
+    name: Total clean area
+    category: diagnostic
+    class: area
+    dps:
+      - id: 117
+        type: integer
+        name: sensor
+        unit: "m²"
+
+  - entity: sensor
+    name: Total clean count
+    category: diagnostic
+    icon: "mdi:counter"
+    dps:
+      - id: 118
+        type: integer
+        name: sensor
+        class: measurement
+
+  - entity: sensor
+    name: Side brush time
+    category: diagnostic
+    dps:
+      - id: 119
+        type: integer
+        name: sensor
+        unit: s
+        class: measurement
+
+  - entity: sensor
+    name: Main brush life
+    category: diagnostic
+    dps:
+      - id: 120
+        type: integer
+        name: sensor
+        unit: s
+        class: measurement
+
+  - entity: sensor
+    translation_key: filter_life
+    category: diagnostic
+    dps:
+      - id: 121
+        type: integer
+        name: sensor
+        unit: s
+        class: measurement
+
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 122
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 122
+        type: bitfield
+        name: fault_code
+
+  - entity: switch
+    name: Auto boost
+    category: config
+    dps:
+      - id: 137
+        type: boolean
+        name: switch
+
+  - entity: binary_sensor
+    name: Mop attached
+    class: connectivity
+    dps:
+      - id: 138
+        type: boolean
+        name: sensor
+
+  - entity: switch
+    name: Mop only mode
+    category: config
+    dps:
+      - id: 141
+        type: boolean
+        name: switch
+
+  - entity: switch
+    name: Charge switch
+    category: config
+    dps:
+      - id: 103
+        type: boolean
+        name: switch
+
+  - entity: switch
+    name: Deep clean
+    category: config
+    dps:
+      - id: 142
+        type: boolean
+        name: switch
+
+  - entity: switch
+    name: Room mode
+    category: config
+    dps:
+      - id: 144
+        type: boolean
+        name: switch