Jelajahi Sumber

Add device files for Globe Ceiling Fans with RGBCW Lights & Remotes (#3713)

* Add files via upload
* Change max color_temp to 5000K per Globe's specifications
* feat (globe_ceilingfanrgbcwlight): changes from review
- abbreviate device name
- use translation keys where available
- use translated fan presets
- remove duplicate timer

PR #3713
---------

Co-authored-by: HushBrought <hush-brough-womb@duck.com>
Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Ishan 5 bulan lalu
induk
melakukan
4cb5ec6c08

+ 123 - 0
custom_components/tuya_local/devices/globe_ceilingfanrgbcwlight.yaml

@@ -0,0 +1,123 @@
+name: Ceiling fan
+products:
+  - id: twyyic5gptzkhbav
+    manufacturer: Globe
+    model: 27109-U
+entities:
+  - entity: fan
+    icon: "mdi:ceiling-fan"
+    translation_only_key: fan_with_presets
+    dps:
+      - id: 107
+        type: boolean
+        name: switch
+      - id: 106
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: sleep
+            value: sleep
+          - dps_val: nature
+            value: nature
+      - id: 105
+        type: integer
+        name: speed
+        range:
+          min: 1
+          max: 6
+      - id: 104
+        type: string
+        name: direction
+  - entity: light
+    icon: "mdi:ceiling-fan-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
+      - 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: 2000
+              max: 5000
+      - 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: 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: switch
+    translation_key: nightlight
+    dps:
+      - id: 53
+        type: boolean
+        name: switch
+  - entity: time
+    name: Light Timer
+    translation_key: timer
+    category: config
+    dps:
+      - id: 26
+        type: integer
+        optional: true
+        name: second
+        range:
+          min: 0
+          max: 86400
+  - entity: time
+    name: Fan Timer
+    translation_key: timer
+    category: config
+    dps:
+      - id: 103
+        type: integer
+        optional: true
+        name: second
+        range:
+          min: 0
+          max: 86400

+ 108 - 0
custom_components/tuya_local/devices/globe_ceilingfanwithlight.yaml

@@ -0,0 +1,108 @@
+name: Ceiling fan
+products:
+  - id: qasrgndvbbtrula9
+    manufacturer: Globe
+    model: 27105/27107/27109
+entities:
+  - entity: fan
+    icon: "mdi:ceiling-fan"
+    dps:
+      - id: 60
+        type: boolean
+        name: switch
+      - id: 62
+        type: integer
+        name: speed
+        range:
+          min: 1
+          max: 6
+      - id: 63
+        type: string
+        name: direction
+  - entity: light
+    icon: "mdi:ceiling-fan-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
+      - 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: 2000
+              max: 5000
+      - 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: 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: time
+    name: Light Timer
+    translation_key: timer
+    category: config
+    dps:
+      - id: 26
+        type: integer
+        optional: true
+        name: second
+        range:
+          min: 0
+          max: 86400
+  - entity: time
+    name: Fan Timer
+    translation_key: timer
+    category: config
+    dps:
+      - id: 64
+        type: integer
+        optional: true
+        name: second
+        range:
+          min: 0
+          max: 86400