Переглянути джерело

Add NHZS fan speed switch device config (#5038)

* Add NHZS fan speed switch device config

* Use translation_key backlight and add newline at EOF

* Address review feedback: fix model, use time entity for timer, use initial_state translation
Daniel Boluda 1 день тому
батько
коміт
8596405170

+ 50 - 0
custom_components/tuya_local/devices/nhzs_fan_switch.yaml

@@ -0,0 +1,50 @@
+name: Fan speed switch
+products:
+  - id: cwwc6ga2gz8mvrqo
+    manufacturer: NHZS
+    model: cwwc6ga2gz8mvrqo
+entities:
+  - entity: fan
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+      - id: 4
+        type: integer
+        name: speed
+        range:
+          min: 1
+          max: 20
+  - entity: time
+    translation_key: timer
+    category: config
+    dps:
+      - id: 2
+        type: integer
+        name: minute
+        optional: true
+        range:
+          min: 0
+          max: 1440
+  - entity: select
+    translation_key: initial_state
+    category: config
+    dps:
+      - id: 11
+        type: string
+        name: option
+        optional: true
+        mapping:
+          - dps_val: "on"
+            value: "on"
+          - dps_val: "off"
+            value: "off"
+          - dps_val: memory
+            value: memory
+  - entity: light
+    translation_key: backlight
+    category: config
+    dps:
+      - id: 13
+        type: boolean
+        name: switch