Ver Fonte

Add support for Ovlaim ceiling fan with light

Issue #749
Jason Rumney há 2 anos atrás
pai
commit
a488329b3f

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -342,3 +342,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [SergioFuchs](https://github.com/SergioFuchs) for assisting with support for Moes star projector.
 - [Batav93](https://github.com/Batav93) for assisting with support for Duux Whisper Flex fans.
 - [Atirion](https://github.com/Atirion) for assisting with support for Nedis Door/Window sensors.
+- [allanak](https://github.com/allanak) for assisting with support for Ovlaim ceiling fans.

+ 1 - 0
DEVICES.md

@@ -135,6 +135,7 @@
 - Ledkia fan and light controller
 - Lexy F501 fan
 - Mantra ceiling fan with light
+- Ovlaim ceiling fan with cool/warm white dimmable light
 - Royal Clima RCB 150 ventilation system
 - Skyfan DC fan
 - Skyfan DC fan with light

+ 82 - 0
custom_components/tuya_local/devices/ovlaim_ceiling_fan_light.yaml

@@ -0,0 +1,82 @@
+name: Ceiling fan
+products:
+  - id: g0ewlb1vmwqljzji
+    name: Ovlaim FP9805_TAIDE
+primary_entity:
+  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: sleep
+          value: sleep
+        - dps_val: nature
+          value: nature
+    - id: 3
+      name: speed
+      type: string
+      mapping:
+        - dps_val: "1"
+          value: 17
+        - dps_val: "2"
+          value: 33
+        - dps_val: "3"
+          value: 50
+        - dps_val: "4"
+          value: 67
+        - dps_val: "5"
+          value: 83
+        - dps_val: "6"
+          value: 100
+    - id: 8
+      name: direction
+      type: string
+secondary_entities:
+  - entity: light
+    dps:
+      - id: 15
+        name: switch
+        type: boolean
+      - id: 16
+        name: brightness
+        type: integer
+        range:
+          min: 0
+          max: 100
+        mapping:
+          - scale: 0.392
+      - id: 17
+        name: color_temp
+        type: integer
+        range:
+          min: 0
+          max: 100
+        mapping:
+          - invert: true
+  - entity: select
+    name: Timer
+    icon: "mdi:timer"
+    category: config
+    dps:
+      - id: 22
+        type: string
+        name: option
+        mapping:
+          - dps_val: cancel
+            value: "Off"
+          - dps_val: "1h"
+            value: "1 hour"
+          - dps_val: "2h"
+            value: "2 hours"
+          - dps_val: "4h"
+            value: "4 hours"
+          - dps_val: "8h"
+            value: "8 hours"
+