瀏覽代碼

Add support for Varin CFWI50 RGBCW ceiling fan

Issue #3218
Jason Rumney 8 月之前
父節點
當前提交
f1df975c8e
共有 3 個文件被更改,包括 266 次插入1 次删除
  1. 1 1
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 264 0
      custom_components/tuya_local/devices/varin_rgbcw_ceilingfan.yaml

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -831,7 +831,7 @@ Further device support has been made with the assistance of users. Please consid
 - [yaro24](https://github.com/yaro24) for contributing support for Jiahong ET-44W thermostat.
 - [yaro24](https://github.com/yaro24) for contributing support for Jiahong ET-44W thermostat.
 - [point2start](https://github.com/point2start) for assisting with support for Atorch AT4PTW thermostat.
 - [point2start](https://github.com/point2start) for assisting with support for Atorch AT4PTW thermostat.
 - [maLLoud86](https://github.com/maLLoud86) for assisting with support for iSparkle Curtain Micro Lights.
 - [maLLoud86](https://github.com/maLLoud86) for assisting with support for iSparkle Curtain Micro Lights.
-- [josvink66](https://github.com/josvink66) for assisting with support for Easybaby GS-801 infant formula maker.
+- [josvink66](https://github.com/josvink66) for assisting with support for Easybaby GS-801 infant formula maker, Varin RGBCW ceiling fan.
 - [Karlsons88](https://github.com/Karlsons88) for assisting with support for Nulite monobloc heat pump.
 - [Karlsons88](https://github.com/Karlsons88) for assisting with support for Nulite monobloc heat pump.
 - [Watanuki-kun](https://github.com/Watanuki-kun) for assisting with support for Smart Amari ceiling fan with light.
 - [Watanuki-kun](https://github.com/Watanuki-kun) for assisting with support for Smart Amari ceiling fan with light.
 - [aherbjornsen](https://github.com/aherbjornsen) for assisting with support for Arida Venti 160 ventilation fan.
 - [aherbjornsen](https://github.com/aherbjornsen) for assisting with support for Arida Venti 160 ventilation fan.

+ 1 - 0
DEVICES.md

@@ -296,6 +296,7 @@
 - TMWF02 fan controller
 - TMWF02 fan controller
 - Treatlife DS02-F fan switch
 - Treatlife DS02-F fan switch
 - Treatlife DS03 fan with dimmable light
 - Treatlife DS03 fan with dimmable light
+- Varin CFWI50 RGBCW ceiling fan
 - Windcalm ceiling fans with and without cool/warm white dimmable light
 - Windcalm ceiling fans with and without cool/warm white dimmable light
 - Yidi/NHZS fan and light wall switch
 - Yidi/NHZS fan and light wall switch
 
 

+ 264 - 0
custom_components/tuya_local/devices/varin_rgbcw_ceilingfan.yaml

@@ -0,0 +1,264 @@
+name: Ceiling fan
+products:
+  - id: o3cen4o6nxdwfga8
+    manufacturer: Varin
+    model: CFWI50
+entities:
+  - entity: light
+    dps:
+      - id: 20
+        type: boolean
+        name: switch
+      - id: 21
+        name: color_mode
+        type: string
+        mapping:
+          - dps_val: white
+            value: color_temp
+          - dps_val: colour
+            value: hs
+          - dps_val: scene
+            value: Scene
+          - dps_val: music
+            value: Music
+      - id: 22
+        name: brightness
+        type: integer
+        range:
+          min: 10
+          max: 1000
+      - id: 23
+        name: color_temp
+        type: integer
+        range:
+          min: 0
+          max: 1000
+        mapping:
+          - target_range:
+              min: 3000
+              max: 6500
+      - id: 24
+        name: rgbhsv
+        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
+    name: Light control
+    category: config
+    icon: "mdi:cogs"
+    hidden: true
+    dps:
+      - id: 28
+        type: string
+        optional: true
+        name: value
+  - entity: text
+    name: Power memory
+    category: config
+    icon: "mdi:power-plug-off"
+    hidden: true
+    dps:
+      - id: 33
+        type: base64
+        optional: true
+        name: value
+  - entity: switch
+    name: Do not disturb
+    icon: "mdi:sleep"
+    category: config
+    dps:
+      - id: 34
+        type: boolean
+        name: switch
+        mapping:
+          - dps_val: false
+            icon: "mdi:sleep-off"
+            icon_priority: 1
+  - entity: text
+    name: Fading
+    category: config
+    icon: "mdi:gradient-horizontal"
+    hidden: true
+    dps:
+      - id: 25
+        type: base64
+        optional: true
+        name: value
+  - entity: text
+    name: Mix RGBW
+    category: config
+    icon: "mdi:palette"
+    hidden: true
+    dps:
+      - id: 51
+        type: base64
+        optional: true
+        name: value
+  - entity: fan
+    dps:
+      - id: 60
+        type: boolean
+        name: switch
+      - id: 61
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: fresh
+            value: fresh
+          - dps_val: nature
+            value: nature
+      - id: 62
+        type: integer
+        name: speed
+        range:
+          min: 1
+          max: 100
+      - id: 63
+        type: string
+        name: direction
+      - id: 106
+        type: boolean
+        name: oscillate
+  - entity: number
+    name: Fan timer
+    translation_key: timer
+    category: config
+    dps:
+      - id: 64
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 540
+  - entity: switch
+    translation_key: keytone
+    category: config
+    dps:
+      - id: 103
+        type: boolean
+        name: switch
+  - entity: light
+    name: White
+    category: config
+    dps:
+      - id: 107
+        type: boolean
+        name: switch
+      - id: 22
+        name: brightness
+        type: integer
+        range:
+          min: 10
+          max: 1000
+      - id: 23
+        name: color_temp
+        type: integer
+        range:
+          min: 0
+          max: 1000
+        mapping:
+          - target_range:
+              min: 3000
+              max: 6500
+  - entity: light
+    name: Color
+    category: config
+    dps:
+      - id: 108
+        type: boolean
+        name: switch
+      - id: 24
+        name: rgbhsv
+        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
+    name: Scene
+    category: config
+    icon: "mdi:palette"
+    hidden: true
+    dps:
+      - id: 109
+        type: base64
+        optional: true
+        name: value
+  - entity: number
+    name: Light rotate
+    category: config
+    icon: "mdi:rotate-360"
+    dps:
+      - id: 110
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 5
+  - entity: number
+    name: Pixels
+    category: config
+    icon: "mdi:dots-circle"
+    dps:
+      - id: 111
+        type: integer
+        name: value
+        range:
+          min: 10
+          max: 130
+  - entity: number
+    translation_key: timer
+    category: config
+    class: duration
+    dps:
+      - id: 112
+        type: integer
+        optional: true
+        name: value
+        unit: s
+        range:
+          min: 0
+          max: 86400
+  - entity: switch
+    category: config
+    dps:
+      - id: 119
+        type: boolean
+        name: switch
+  - entity: text
+    name: Music
+    category: config
+    icon: "mdi:music"
+    hidden: true
+    dps:
+      - id: 121
+        type: base64
+        optional: true
+        name: value