Przeglądaj źródła

Create smartmi_air_circulator_fan.yaml (#4133)

* Create smartmi_air_circulator_fan.yaml

* Apply review feedback for Smartmi Air Circulator Fan

* fix (smartmi_air_circulator_fan): move branding under products

PR #4133

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
HW-YUN 2 miesięcy temu
rodzic
commit
21a9cc0cc0

+ 145 - 0
custom_components/tuya_local/devices/smartmi_air_circulator_fan.yaml

@@ -0,0 +1,145 @@
+# Smartmi Air Circulator Fan
+# Category: fs
+# Product ID (PID): ld6lwruyddlfx7a2
+# Tested with Tuya Local
+
+name: Circulating fan
+products:
+  - id: ld6lwruyddlfx7a2
+    manufacturer: Smartmi
+    model: ZLBPKQXHS02ZM
+entities:
+  # -------------------------------------------------------
+  # Fan
+  # -------------------------------------------------------
+  - entity: fan
+    translation_key: fan_with_presets
+    dps:
+      - id: 1
+        name: switch
+        type: boolean
+
+      - id: 2
+        name: preset_mode
+        type: string
+        mapping:
+          - dps_val: normal
+            value: normal
+          - dps_val: nature
+            value: nature
+          - dps_val: smart
+            value: smart
+
+      - id: 3
+        name: speed
+        type: integer
+        range:
+          min: 1
+          max: 4
+
+  # -------------------------------------------------------
+  # Timer
+  # -------------------------------------------------------
+  - entity: select
+    translation_key: timer
+    category: config
+    dps:
+      - id: 22
+        name: option
+        type: string
+        mapping:
+          - dps_val: cancel
+            value: cancel
+          - dps_val: "1h"
+            value: 1h
+          - dps_val: "2h"
+            value: 2h
+          - dps_val: "3h"
+            value: 3h
+          - dps_val: "4h"
+            value: 4h
+          - dps_val: "5h"
+            value: 5h
+          - dps_val: "6h"
+            value: 6h
+          - dps_val: "7h"
+            value: 7h
+          - dps_val: "8h"
+            value: 8h
+
+  # -------------------------------------------------------
+  # Oscillation
+  # -------------------------------------------------------
+  - entity: switch
+    name: Vertical oscillation
+    dps:
+      - id: 4
+        name: switch
+        type: boolean
+
+  - entity: switch
+    name: Horizontal oscillation
+    dps:
+      - id: 5
+        name: switch
+        type: boolean
+
+  # -------------------------------------------------------
+  # Angle
+  # -------------------------------------------------------
+  - entity: select
+    name: Vertical angle
+    dps:
+      - id: 6
+        name: option
+        type: string
+        mapping:
+          - dps_val: "30"
+            value: 30°
+          - dps_val: "60"
+            value: 60°
+          - dps_val: "90"
+            value: 90°
+
+  - entity: select
+    name: Horizontal angle
+    dps:
+      - id: 7
+        name: option
+        type: string
+        mapping:
+          - dps_val: "30"
+            value: 30°
+          - dps_val: "60"
+            value: 60°
+          - dps_val: "90"
+            value: 90°
+          - dps_val: "120"
+            value: 120°
+
+  # -------------------------------------------------------
+  # Misc
+  # -------------------------------------------------------
+  - entity: switch
+    name: Beep
+    category: config
+    dps:
+      - id: 13
+        name: switch
+        type: boolean
+
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 14
+        name: lock
+        type: boolean
+
+  - entity: light
+    translation_key: indicator
+    category: config
+    dps:
+      - id: 15
+        name: switch
+        type: boolean