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

Add support for a 2nd version of Treatlife DS03 ceiling fan and light

Issue #3211
Jason Rumney 8 месяцев назад
Родитель
Сommit
f7d9639d53

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -939,3 +939,4 @@ Further device support has been made with the assistance of users. Please consid
 - [teichmaj](https://github.com/teichmaj) for assisting with support for Emmeti Zona thermostat.
 - [VulpesFurvus](https://github.com/VulpesFurvus) for contributing Portuguese translations and support for Dowell iOneAIO EV charger.
 - [alexeytm82](https://github.com/alexeytm82) for contributing support for MakeSkyBlue MPPT solar charger.
+- [com6056](https://github.com/com6056) for assisting with support for Treatlife DS03 (v2) ceiling fan and light.

+ 120 - 0
custom_components/tuya_local/devices/treatlife_ds03v2_fanlight.yaml

@@ -0,0 +1,120 @@
+name: Ceiling fan
+products:
+  - id: ea88zei7auxu48s6
+    manufacturer: Treatlife
+    model: DS03
+entities:
+  - entity: fan
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+      - id: 3
+        type: string
+        name: speed
+        mapping:
+          - dps_val: "1"
+            value: 25
+          - dps_val: "2"
+            value: 50
+          - dps_val: "3"
+            value: 75
+          - dps_val: "4"
+            value: 100
+  - entity: light
+    dps:
+      - id: 101
+        type: boolean
+        name: switch
+      - id: 6
+        type: integer
+        name: brightness
+        range:
+          min: 10
+          max: 1000
+      - id: 105
+        type: integer
+        name: minimum_brightness
+        optional: true
+      - id: 106
+        type: string
+        name: effect
+        mapping:
+          - dps_val: mode1
+            value: Mode 1
+          - dps_val: mode2
+            value: Mode 2
+          - dps_val: mode3
+            value: Mode 3
+  - entity: number
+    name: Fan timer
+    translation_key: timer
+    class: duration
+    category: config
+    dps:
+      - id: 102
+        type: integer
+        optional: true
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 1440
+  - entity: number
+    name: Light timer
+    translation_key: timer
+    class: duration
+    category: config
+    dps:
+      - id: 103
+        type: integer
+        optional: true
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 1440
+  - entity: number
+    name: Minimum brightness
+    category: config
+    icon: "mdi:lightbulb-on-60"
+    dps:
+      - id: 105
+        type: integer
+        name: value
+        unit: "%"
+        range:
+          min: 10
+          max: 1000
+        mapping:
+          - scale: 10
+  - entity: text
+    name: Power on config
+    category: config
+    icon: "mdi:cogs"
+    hidden: true
+    dps:
+      - id: 107
+        type: string
+        optional: true
+        name: value
+  - entity: light
+    translation_key: indicator
+    category: config
+    dps:
+      - id: 108
+        name: brightness
+        type: integer
+        range:
+          min: 0
+          max: 2
+  - entity: text
+    name: Random schedule
+    category: config
+    icon: "mdi:calendar"
+    hidden: true
+    dps:
+      - id: 109
+        type: string
+        optional: true
+        name: value