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

feat (moes_zcjk_alarmclock): attempt to better handle the color loop effect

Show color loop as an effect instead of as the color white.
- hide white from the list of colors, but support reporting it because we need to report something.
- add an effect of loop, choose red when turning the effect off, because we have to select something.

PR #4653
Jason Rumney 3 дней назад
Родитель
Сommit
ec159c5823
1 измененных файлов с 11 добавлено и 0 удалено
  1. 11 0
      custom_components/tuya_local/devices/moes_zcjk_alarmclock.yaml

+ 11 - 0
custom_components/tuya_local/devices/moes_zcjk_alarmclock.yaml

@@ -206,6 +206,7 @@ entities:
         mapping:
           - dps_val: "1"
             value: white
+            hidden: true
           - dps_val: "2"
             value: red
           - dps_val: "3"
@@ -220,6 +221,16 @@ entities:
             value: blue
           - dps_val: "8"
             value: magenta
+      - id: 132
+        type: string
+        name: effect
+        mapping:
+          - dps_val: "1"
+            value: Loop
+          - dps_val: "2"
+            value: "off"
+          - value: "off"
+            hidden: true
   - entity: switch
     name: Snooze
     icon: "mdi:alarm-snooze"