Sfoglia il codice sorgente

(feat) New Device Support - Hiniso 10L Smart Dehumidifier (Model RM10S) (#5413)

## Description
Adds support for the Hiniso 10L Smart Dehumidifier (Model RM10S) 
The existing hiniso dehumidifier integration (hiniso_dehumidifier.yaml)
didn't work probably becasue of a new firmware, as most of the DP IDs
are different in this model, few are noted below.

Protocol Version: 3.5

### Mapping Notes:
* **Modes (DP 5):** 
  * `dehumidify` -> `Normal` (Compressor reacts to manual RH target)
* `auto` -> (AU) `comfort` (Hardware ignores manual target in this mode
and sets internal compressor logic based on ambient room temperature).
* `continuous` -> (CO) `boost` (Hardware ignores humidity sensors and
runs compressor 24/7).
* *Note on DP 2:* When the unit enters `auto` mode, the Tuya Wi-Fi chip
overrides DP 2 and hardcodes it to `30`. This is hardware-level
behavior, but it's not eactly right, the compressor logic is internal it
depends on the ambient temerature and follows a hardware level logic,
which is this: temp>27 = humidity 50, 20<temp<27 = humidity 55, and
5<temp<20 = humidity 60%. temp<5 = compressor turns off. But DP-2 is set
to 30% for whatever reason, this is a known hardware limitation.
* **Child Lock (DP 16):** This unit doesn't have that feature, but the
Tuya chip broadcasts and accepts the command. Mapped as a hidden
`config` entity as without this the Stage 2 of pairing fails (device
doesn't show up).
* **Timer:** Moved to DP 101

## Device Signature
```
"cached_state": {
      "updated_at": 1782400067.400447,
      "1": true,
      "2": 50,
      "4": "high",
      "5": "dehumidify",
      "6": 59,
      "16": false,
      "25": "off",
      "101": "None"
    }
```

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Malhar Chakraborty 1 mese fa
parent
commit
8df13796df

+ 138 - 0
custom_components/tuya_local/devices/hiniso_rm10s_dehumidifier.yaml

@@ -0,0 +1,138 @@
+# HINISO Model: RM10S (10L Smart Dehumidifier)
+
+name: Dehumidifier
+
+entities:
+  # CORE HUMIDIFIER CONTROLS
+  - entity: humidifier
+    class: dehumidifier
+    translation_key: extended
+    dps:
+      - id: 1
+        name: switch
+        type: boolean
+      - id: 2
+        name: humidity
+        type: integer
+        range:
+          min: 30
+          max: 90
+        mapping:
+          - step: 5
+      - id: 5
+        name: mode
+        type: string
+        mapping:
+          # Dehumidify mode, runs the compressor based on set target humidity
+          - dps_val: dehumidify
+            value: normal
+          # Comfort mode (AU) as per the manual, relies on internal logic.
+          # it controls the compressor based on ambient temperature.
+          - dps_val: auto
+            value: comfort
+          # Continuous mode (CO) runs the compressor continuously
+          - dps_val: continuous
+            value: continuous
+      - id: 6
+        name: current_humidity
+        type: integer
+
+  # WATER TANK FULL
+  - entity: binary_sensor
+    translation_key: tank_full
+    dps:
+      - id: 25
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: "on"
+            value: true
+          - dps_val: "off"
+            value: false
+
+  # FAN SPEED
+  - entity: fan
+    dps:
+      - id: 1
+        name: switch
+        type: boolean
+      - id: 4
+        type: string
+        name: speed
+        mapping:
+          - dps_val: low
+            value: 50
+          - dps_val: high
+            value: 100
+
+  # TIMER
+  - entity: select
+    translation_key: timer
+    category: config
+    dps:
+      - id: 101
+        type: string
+        name: option
+        mapping:
+          - dps_val: "None"
+            value: cancel
+          - dps_val: "1hr"
+            value: "1h"
+          - dps_val: "2hrs"
+            value: "2h"
+          - dps_val: "3hrs"
+            value: "3h"
+          - dps_val: "4hrs"
+            value: "4h"
+          - dps_val: "5hrs"
+            value: "5h"
+          - dps_val: "6hrs"
+            value: "6h"
+          - dps_val: "7hrs"
+            value: "7h"
+          - dps_val: "8hrs"
+            value: "8h"
+          - dps_val: "9hrs"
+            value: "9h"
+          - dps_val: "10hrs"
+            value: "10h"
+          - dps_val: "11hrs"
+            value: "11h"
+          - dps_val: "12hrs"
+            value: "12h"
+          - dps_val: "13hrs"
+            value: "13h"
+          - dps_val: "14hrs"
+            value: "14h"
+          - dps_val: "15hrs"
+            value: "15h"
+          - dps_val: "16hrs"
+            value: "16h"
+          - dps_val: "17hrs"
+            value: "17h"
+          - dps_val: "18hrs"
+            value: "18h"
+          - dps_val: "19hrs"
+            value: "19h"
+          - dps_val: "20hrs"
+            value: "20h"
+          - dps_val: "21hrs"
+            value: "21h"
+          - dps_val: "22hrs"
+            value: "22h"
+          - dps_val: "23hrs"
+            value: "23h"
+          - dps_val: "24hrs"
+            value: "24h"
+
+  # --- HIDDEN DPS - Features Not Supported/Available for this Specific Unit ---
+
+  # CHILD LOCK (Hidden because physical unit lacks support)
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    hidden: true
+    dps:
+      - id: 16
+        type: boolean
+        name: lock