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

fix(yuhome_laundry_rack): correct DP ids to match actual device (#5303)

* fix(yuhome_laundry_rack): correct DP ids to match actual device

Correcting my original config (#4643) against live DPS read from the
device (product id ttawi9yohqflpt4a, protocol 3.4):

- Action/state, timers and duration sensors were on the wrong dp ids.
  The device exposes no dp 8/12/14; the real ids are 9 (action),
  10/11/13 (timers), 15/16/17 (durations).
- Add light effect (dp 102: Warm/Cool/Dual white).
- Add Voice control switch (dp 104).
- Add Fault problem binary_sensor (dp 18).
- Add 'stop' -> idle cover-action mapping.

Verified live values: dp9='stop', dp10/11/13='cancel', dp15-17=0,
dp18=0, dp102='Cool_White', dp104=False.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(yuhome_laundry_rack): drop explicit names per review

Remove explicit name from the main switch, light and fault sensor so
they follow HA naming (device name / device-class derived), per
maintainer review feedback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Wei Kit 2 недель назад
Родитель
Сommit
3aa4fcd943
1 измененных файлов с 41 добавлено и 7 удалено
  1. 41 7
      custom_components/tuya_local/devices/yuhome_laundry_rack.yaml

+ 41 - 7
custom_components/tuya_local/devices/yuhome_laundry_rack.yaml

@@ -28,7 +28,7 @@ entities:
         range:
         range:
           min: 0
           min: 0
           max: 100
           max: 100
-      - id: 8
+      - id: 9
         type: string
         type: string
         name: action
         name: action
         mapping:
         mapping:
@@ -36,12 +36,24 @@ entities:
             value: closing
             value: closing
           - dps_val: down
           - dps_val: down
             value: opening
             value: opening
+          - dps_val: stop
+            value: idle
           - value: null
           - value: null
   - entity: light
   - entity: light
     dps:
     dps:
       - id: 4
       - id: 4
         type: boolean
         type: boolean
         name: switch
         name: switch
+      - id: 102
+        type: string
+        name: effect
+        mapping:
+          - dps_val: Warm_White
+            value: Warm white
+          - dps_val: Cool_White
+            value: Cool white
+          - dps_val: Dual_White
+            value: Dual white
   - entity: switch
   - entity: switch
     translation_key: uv_sterilization
     translation_key: uv_sterilization
     dps:
     dps:
@@ -62,12 +74,20 @@ entities:
       - id: 7
       - id: 7
         type: boolean
         type: boolean
         name: switch
         name: switch
+  - entity: switch
+    name: Voice control
+    icon: "mdi:microphone"
+    category: config
+    dps:
+      - id: 104
+        type: boolean
+        name: switch
   - entity: select
   - entity: select
     name: Disinfection timer
     name: Disinfection timer
     translation_key: timer
     translation_key: timer
     category: config
     category: config
     dps:
     dps:
-      - id: 9
+      - id: 10
         type: string
         type: string
         name: option
         name: option
         mapping:
         mapping:
@@ -102,7 +122,7 @@ entities:
     translation_key: timer
     translation_key: timer
     category: config
     category: config
     dps:
     dps:
-      - id: 10
+      - id: 11
         type: string
         type: string
         name: option
         name: option
         mapping:
         mapping:
@@ -137,7 +157,7 @@ entities:
     translation_key: timer
     translation_key: timer
     category: config
     category: config
     dps:
     dps:
-      - id: 11
+      - id: 13
         type: string
         type: string
         name: option
         name: option
         mapping:
         mapping:
@@ -172,7 +192,7 @@ entities:
     class: duration
     class: duration
     category: diagnostic
     category: diagnostic
     dps:
     dps:
-      - id: 12
+      - id: 15
         type: integer
         type: integer
         optional: true
         optional: true
         name: sensor
         name: sensor
@@ -182,7 +202,7 @@ entities:
     class: duration
     class: duration
     category: diagnostic
     category: diagnostic
     dps:
     dps:
-      - id: 13
+      - id: 16
         type: integer
         type: integer
         optional: true
         optional: true
         name: sensor
         name: sensor
@@ -192,8 +212,22 @@ entities:
     class: duration
     class: duration
     category: diagnostic
     category: diagnostic
     dps:
     dps:
-      - id: 14
+      - id: 17
         type: integer
         type: integer
         optional: true
         optional: true
         name: sensor
         name: sensor
         unit: min
         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