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

fix(homend_royaltea_kettle): adjust for user observations

The portal documentation seems to be misleading for some dps, and
there are a few dps that seem unimplemented.

- use dp 4 as backup for dp 8 temperature, as the latter seems unused.
  I implemented it as a backup in case there are some settings where dp 8
  becomes useful.
- use dp 104 as backup for dp 15 status. The values for this are not
  documented, but @ErsinErce has figured some out. It seems dp 15, while
  fully documented is not sent.

Issue #3341
Jason Rumney 8 месяцев назад
Родитель
Сommit
5490dde70a
1 измененных файлов с 54 добавлено и 36 удалено
  1. 54 36
      custom_components/tuya_local/devices/homend_royaltea_kettle.yaml

+ 54 - 36
custom_components/tuya_local/devices/homend_royaltea_kettle.yaml

@@ -25,6 +25,25 @@ entities:
         range:
           min: 0
           max: 100
+        mapping:
+          - dps_val: null
+            range:
+              min: 50
+              max: 90
+            step: 13
+            value_redirect: quick_temp
+      - id: 4
+        type: string
+        name: quick_temp
+        mapping:
+          - dps_val: "50"
+            value: 50
+          - dps_val: "65"
+            value: 65
+          - dps_val: "85"
+            value: 85
+          - dps_val: "90"
+            value: 90
   - entity: select
     translation_key: kettle_mode
     dps:
@@ -54,27 +73,6 @@ entities:
           max: 180
         mapping:
           - step: 15
-  - entity: sensor
-    translation_key: status
-    class: enum
-    dps:
-      - id: 15
-        type: string
-        optional: true
-        name: sensor
-        mapping:
-          - dps_val: standby
-            value: standby
-          - dps_val: heating
-            value: heating
-          - dps_val: cooling
-            value: cooling
-          - dps_val: warm
-            value: keeping_warm
-          - dps_val: heating_temp
-            value: at_temperature
-          - dps_val: boiling_temp
-            value: boiling
   - entity: select
     name: Preset
     translation_key: kettle_mode
@@ -90,6 +88,7 @@ entities:
             value: boil
           - dps_val: temp_baby
             value: infant_formula
+            hidden: true
   - entity: switch
     name: Voice
     icon: "mdi:account-voice"
@@ -107,6 +106,7 @@ entities:
     name: Operating mode
     translation_key: kettle_mode
     category: config
+    hidden: true
     dps:
       - id: 102
         type: string
@@ -128,32 +128,50 @@ entities:
         name: sensor
         unit: min
         class: measurement
-  - entity: select
-    name: Alarm tone
-    icon: "mdi:alarm-note"
-    category: config
+  - entity: sensor
+    translation_key: status
+    class: enum
     dps:
       - id: 104
         type: string
-        name: option
+        name: alarm_ringtone
         mapping:
           - dps_val: AR0
-            value: Tone 1
+            value: Unknown 0
           - dps_val: AR1
-            value: Tone 2
+            value: Unknown 1
           - dps_val: AR2
-            value: Tone 3
+            value: done
           - dps_val: AR3
-            value: Tone 4
+            value: cooling
           - dps_val: AR4
-            value: Tone 5
+            value: Unknown 4
           - dps_val: AR5
-            value: Tone 6
+            value: keeping_warm
           - dps_val: AR6
-            value: Tone 7
+            value: standby
           - dps_val: AR7
-            value: Tone 8
+            value: Unknown 7
           - dps_val: AR8
-            value: Tone 9
+            value: Unknown 8
           - dps_val: AR9
-            value: Tone 10
+            value: at_temperature
+      - id: 15
+        type: string
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: null
+            value: redirect: alarm_ringtone
+          - dps_val: standby
+            value: standby
+          - dps_val: heating
+            value: heating
+          - dps_val: cooling
+            value: cooling
+          - dps_val: warm
+            value: keeping_warm
+          - dps_val: heating_temp
+            value: at_temperature
+          - dps_val: boiling_temp
+            value: boiling