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

feat (devices): add NP-DVL-01 ceiling fan with RGB+CW lights

Issue #4614
Jason Rumney 1 день назад
Родитель
Сommit
d5b5fc924c
3 измененных файлов с 208 добавлено и 0 удалено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 206 0
      custom_components/tuya_local/devices/npdvl01_ceilingfanlight.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1324,3 +1324,4 @@ Further device support has been made with the assistance of users. Please consid
 - [starfire0606](https://github.com/starfire0606) for contributing support for RGB48 RGBIC string light.
 - [osxisl](https://github.com/osxisl) for assisting with support for Juro-Pro 2006 dehumidifier.
 - [thisistotallyshaun](https://github.com/thisistotallyshaun) for assisting with support for Breville Smart Mist Glow Connect humidifier.
+- [appetjoek1978](https://github.com/appetjoek1978) for assisting with support for NP-DVL-01 ceiling fan with RGB+CW light.

+ 1 - 0
DEVICES.md

@@ -384,6 +384,7 @@
 - Mantra ceiling fan with light
 - New Widetech WPF-16SW5 7-speed pedestal fan
 - Novadigital ceiling fan with light
+- NP-DVL-01 ceiling fan with RGB+CW light
 - OmniBreeze DC2313R tower fan (4-speed and 5-speed models)
 - Orison Chanfok Neo ceiling fan with light
 - Orison RGB ambient bladeless ceiling fan

+ 206 - 0
custom_components/tuya_local/devices/npdvl01_ceilingfanlight.yaml

@@ -0,0 +1,206 @@
+name: Ceiling fan
+products:
+  - id: oyvkkiagwcstatfy
+    model: NP-DVL-01
+entities:
+  - entity: light
+    name: Main light
+    dps:
+      - id: 20
+        type: boolean
+        name: switch
+      - id: 21
+        type: string
+        optional: true
+        name: color_mode
+        mapping:
+          - dps_val: white
+            value: color_temp
+          - dps_val: colour
+            value: hs
+          - dps_val: scene
+            value: Scene
+          - dps_val: music
+            value: Music
+      - id: 22
+        type: integer
+        name: brightness
+        range:
+          min: 10
+          max: 1000
+      - id: 23
+        type: integer
+        name: color_temp
+        range:
+          min: 0
+          max: 1000
+        mapping:
+          - target_range:
+              min: 2700
+              max: 6500
+      - id: 24
+        name: rgbhsv
+        optional: true
+        type: hex
+        format:
+          - name: h
+            bytes: 2
+            range:
+              min: 0
+              max: 360
+          - name: s
+            bytes: 2
+            range:
+              min: 0
+              max: 1000
+          - name: v
+            bytes: 2
+            range:
+              min: 0
+              max: 1000
+  - entity: text
+    translation_key: scene
+    category: config
+    hidden: true
+    dps:
+      - id: 25
+        type: hex
+        optional: true
+        name: value
+  - entity: time
+    translation_key: timer
+    category: config
+    dps:
+      - id: 26
+        type: integer
+        optional: true
+        name: second
+        range:
+          min: 0
+          max: 86399
+  - entity: text
+    name: Light control
+    category: config
+    hidden: true
+    dps:
+      - id: 28
+        type: string
+        optional: true
+        name: value
+  - entity: text
+    translation_key: scene
+    name: Mixed scene
+    category: config
+    hidden: true
+    dps:
+      - id: 36
+        type: base64
+        optional: true
+        name: value
+  - entity: light
+    name: White
+    dps:
+      - id: 20
+        type: boolean
+        name: available
+      - id: 22
+        type: integer
+        name: brightness
+        range:
+          min: 10
+          max: 1000
+      - id: 23
+        type: integer
+        name: color_temp
+        range:
+          min: 0
+          max: 1000
+        mapping:
+          - target_range:
+              min: 2700
+              max: 6500
+      - id: 103
+        type: boolean
+        name: switch
+  - entity: light
+    name: Color
+    dps:
+      - id: 20
+        type: boolean
+        name: available
+      - id: 102
+        type: boolean
+        name: switch
+      - id: 24
+        name: rgbhsv
+        type: hex
+        optional: true
+        format:
+          - name: h
+            bytes: 2
+            range:
+              min: 0
+              max: 360
+          - name: s
+            bytes: 2
+            range:
+              min: 0
+              max: 1000
+          - name: v
+            bytes: 2
+            range:
+              min: 0
+              max: 1000
+  - entity: text
+    name: Color
+    category: config
+    icon: "mdi:palette"
+    hidden: true
+    dps:
+      - id: 51
+        type: base64
+        optional: true
+        name: value
+
+  - entity: fan
+    translation_only_key: fan_with_presets
+    dps:
+      - id: 60
+        type: boolean
+        name: switch
+      - id: 61
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: nature
+            value: nature
+          - dps_val: fresh
+            value: fresh
+      - id: 62
+        type: integer
+        optional: true
+        name: speed
+        range:
+          min: 1
+          max: 6
+      - id: 63
+        type: string
+        optional: true
+        name: direction
+      - id: 101
+        type: boolean
+        name: oscillate
+  - entity: number
+    name: Fan timer
+    translation_key: timer
+    category: config
+    icon: "mdi:fan-clock"
+    dps:
+      - id: 64
+        type: integer
+        optional: true
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 540