Parcourir la source

Add support for Prestige M3 ceiling fan with light

Issue #3056
Jason Rumney il y a 9 mois
Parent
commit
0c7d1006ca

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -905,3 +905,4 @@ Further device support has been made with the assistance of users. Please consid
 - [Zensonize](https://github.com/Zensonize) for contributing support for EWC02 air quality meter.
 - [Otte-S](https://github.com/Otte-S) for assisting with support for LSC Smart Connect Neon LED strip.
 - [Wob76](https://github.com/Wob76) for assisting with support for Sailesi litter box.
+- [Zycrannny](https://github.com/Zycrannny) for assisting with support for Prestige M3 ceiling fan with light.

+ 1 - 0
DEVICES.md

@@ -303,6 +303,7 @@
 - Orison Chanfok Neo ceiling fan with light
 - Orison RGB ambient bladeless ceiling fan
 - Ovlaim ceiling fan with cool/warm white dimmable light
+- Prestige M3 ceiling fan with light
 - Princess DC pedestal fan
 - Reiga ceiling fans with and without light
 - Royal Clima RCB 150 ventilation system

+ 160 - 0
custom_components/tuya_local/devices/prestige_m3_ceilingfanlight.yaml

@@ -0,0 +1,160 @@
+name: Fan with light
+# products:
+#   - id: UNKNOWN
+#     manufacturer: Prestige
+#     model: M3
+entities:
+  - entity: fan
+    translation_only_key: fan_with_presets
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+      - id: 2
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: nature
+            value: nature
+          - dps_val: sleep
+            value: sleep
+          - dps_val: fresh
+            value: fresh
+          - dps_val: smart
+            value: smart
+          - dps_val: custom
+            value: custom
+      - id: 3
+        type: integer
+        name: speed
+        range:
+          min: 1
+          max: 6
+      - id: 8
+        type: string
+        name: direction
+      - id: 101
+        type: integer
+        optional: true
+        name: model_number
+      - id: 102
+        type: integer
+        optional: true
+        name: device_num
+      - id: 103
+        type: integer
+        optional: true
+        name: version
+  - entity: light
+    dps:
+      - id: 15
+        type: boolean
+        name: switch
+      - id: 16
+        name: brightness
+        type: integer
+        range:
+          min: 1
+          max: 100
+      - id: 17
+        type: integer
+        optional: true
+        name: color_temp
+        range:
+          min: 0
+          max: 100
+        mapping:
+          - target_range:
+              min: 3000
+              max: 6500
+          - dps_val: null
+            value_redirect: fixed_color_temp
+      - id: 19
+        type: string
+        name: fixed_color_temp
+        mapping:
+          - dps_val: night
+            value: 3000
+          - dps_val: warm
+            value: 4000
+          - dps_val: white
+            value: 5000
+          - dps_val: cold
+            value: 6500
+  - entity: select
+    name: Fixed color temperature
+    icon: "mdi:lightbulb"
+    category: config
+    dps:
+      - id: 19
+        type: string
+        name: option
+        mapping:
+          - dps_val: night
+            value: Night
+          - dps_val: warm
+            value: Warm white
+          - dps_val: white
+            value: Daylight
+          - dps_val: cold
+            value: Cold white
+  - entity: sensor
+    class: temperature
+    dps:
+      - id: 21
+        type: integer
+        name: sensor
+        unit: C
+        class: measurement
+  - entity: select
+    translation_key: timer
+    category: config
+    dps:
+      - id: 22
+        type: string
+        name: option
+        mapping:
+          - dps_val: cancel
+            value: cancel
+          - dps_val: "1h"
+            value: "1h"
+          - dps_val: "2h"
+            value: "2h"
+          - dps_val: "3h"
+            value: "3h"
+          - dps_val: "4h"
+            value: "4h"
+          - dps_val: "5h"
+            value: "5h"
+          - dps_val: "6h"
+            value: "6h"
+          - dps_val: "7h"
+            value: "7h"
+          - dps_val: "8h"
+            value: "8h"
+          - dps_val: "9h"
+            value: "9h"
+          - dps_val: "10h"
+            value: "10h"
+          - dps_val: "11h"
+            value: "11h"
+          - dps_val: "12h"
+            value: "12h"
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 24
+        type: bitfield
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - dps_val: null
+            value: false
+          - value: true
+      - id: 24
+        type: bitfield
+        optional: true
+        name: fault_code

+ 1 - 0
custom_components/tuya_local/translations/bg.json

@@ -340,6 +340,7 @@
                             "fresh": "Свежо",
                             "smart": "Умен",
                             "strong": "Силен",
+                            "custom": "Потребителски",
                             "high": "Високо",
                             "medium": "Средно",
                             "low": "Ниско",

+ 1 - 0
custom_components/tuya_local/translations/ca.json

@@ -496,6 +496,7 @@
                             "sleep": "Dorm",
                             "smart": "Intel·ligent",
                             "strong": "Fort",
+                            "custom": "Personalitzat",
                             "high": "Alt",
                             "medium": "Mitjà",
                             "low": "Baix",

+ 1 - 0
custom_components/tuya_local/translations/cz.json

@@ -340,6 +340,7 @@
                             "fresh": "Svěží",
                             "smart": "Chytrý",
                             "strong": "Silný",
+                            "custom": "Vlastní",
                             "high": "Vysoký",
                             "medium": "Střední",
                             "low": "Nízký",

+ 1 - 0
custom_components/tuya_local/translations/de.json

@@ -339,6 +339,7 @@
                             "fresh": "Frisch",
                             "smart": "Intelligent",
                             "strong": "Stark",
+                            "custom": "Benutzerdefiniert",
                             "high": "Hoch",
                             "medium": "Mittel",
                             "low": "Niedrig",

+ 1 - 0
custom_components/tuya_local/translations/el.json

@@ -340,6 +340,7 @@
                             "sleep": "Αναμονή",
                             "smart": "Έξυπνο",
                             "strong": "Δυνατό",
+                            "custom": "Προσαρμοσμένο",
                             "high": "Υψηλό",
                             "medium": "Μεσαίο",
                             "low": "Χαμηλό",

+ 1 - 0
custom_components/tuya_local/translations/en.json

@@ -340,6 +340,7 @@
                             "sleep": "Sleep",
                             "smart": "Smart",
                             "strong": "Strong",
+                            "custom": "Custom",
                             "high": "High",
                             "medium": "Medium",
                             "low": "Low",

+ 1 - 0
custom_components/tuya_local/translations/es.json

@@ -340,6 +340,7 @@
                             "fresh": "Fresco",
                             "smart": "Inteligente",
                             "strong": "Fuerte",
+                            "custom": "Personalizado",
                             "high": "Alto",
                             "medium": "Medio",
                             "low": "Bajo",

+ 1 - 0
custom_components/tuya_local/translations/fr.json

@@ -340,6 +340,7 @@
                             "fresh": "Frais",
                             "smart": "Intelligent",
                             "strong": "Fort",
+                            "custom": "Personnalisé",
                             "high": "Haut",
                             "medium": "Moyen",
                             "low": "Bas",

+ 1 - 0
custom_components/tuya_local/translations/hu.json

@@ -341,6 +341,7 @@
                             "fresh": "Friss",
                             "smart": "Okos",
                             "strong": "Erős",
+                            "custom": "Egyéni",
                             "high": "Magas",
                             "medium": "Közepes",
                             "low": "Alacsony",

+ 1 - 0
custom_components/tuya_local/translations/id.json

@@ -340,6 +340,7 @@
                             "fresh": "Segar",
                             "smart": "Pintar",
                             "strong": "Kencang",
+                            "custom": "Kustom",
                             "high": "Tinggi",
                             "medium": "Sedang",
                             "low": "Rendah",

+ 1 - 0
custom_components/tuya_local/translations/it.json

@@ -341,6 +341,7 @@
                             "fresh": "Fresco",
                             "smart": "Intelligente",
                             "strong": "Forte",
+                            "custom": "Personalizzato",
                             "high": "Alto",
                             "medium": "Medio",
                             "low": "Basso",

+ 1 - 0
custom_components/tuya_local/translations/ja.json

@@ -340,6 +340,7 @@
                             "fresh": "新鮮",
                             "smart": "スマート",
                             "strong": "強い",
+                            "custom": "カスタム",
                             "high": "高い",
                             "medium": "中",
                             "low": "低い",

+ 1 - 0
custom_components/tuya_local/translations/no-NB.json

@@ -341,6 +341,7 @@
                             "fresh": "Fresh",
                             "smart": "Smart",
                             "strong": "Sterk",
+                            "custom": "Egendefinert",
                             "high": "Høy",
                             "medium": "Medium",
                             "low": "Lav",

+ 1 - 0
custom_components/tuya_local/translations/pl.json

@@ -340,6 +340,7 @@
                             "fresh": "Świeży",
                             "smart": "Inteligentny",
                             "strong": "Silny",
+                            "custom": "Niestandardowy",
                             "high": "Wysoki",
                             "medium": "Średni",
                             "low": "Niski",

+ 1 - 0
custom_components/tuya_local/translations/pt-BR.json

@@ -340,6 +340,7 @@
                             "fresh": "Fresco",
                             "smart": "Inteligente",
                             "strong": "Forte",
+                            "custom": "Personalizado",
                             "high": "Alto",
                             "medium": "Médio",
                             "low": "Baixo",

+ 1 - 0
custom_components/tuya_local/translations/ru.json

@@ -340,6 +340,7 @@
                             "fresh": "Свежий",
                             "smart": "Умный",
                             "strong": "Мощный",
+                            "custom": "Пользовательский",
                             "high": "Высокий",
                             "medium": "Средний",
                             "low": "Низкий",

+ 1 - 0
custom_components/tuya_local/translations/uk.json

@@ -343,6 +343,7 @@
                             "fresh": "Свіжий",
                             "smart": "Розумний",
                             "strong": "Сильний",
+                            "custom": "Користувацький",
                             "high": "Високий",
                             "medium": "Середній",
                             "low": "Низький",

+ 1 - 0
custom_components/tuya_local/translations/ur.json

@@ -343,6 +343,7 @@
                             "fresh": "تازه",
                             "smart": "سمارٹ",
                             "strong": "مضبوط",
+                            "custom": "اپنی مرضی کے مطابق",
                             "high": "زیادہ",
                             "medium": "درمیانہ",
                             "low": "کم",

+ 1 - 0
custom_components/tuya_local/translations/zh-Hans.json

@@ -340,6 +340,7 @@
                             "sleep": "睡眠",
                             "smart": "智能",
                             "strong": "强劲",
+                            "custom": "自定义",
                             "high": "高",
                             "medium": "中",
                             "low": "低",

+ 1 - 0
custom_components/tuya_local/translations/zh-Hant.json

@@ -341,6 +341,7 @@
                             "sleep": "睡眠",
                             "smart": "智能",
                             "strong": "強勁",
+                            "custom": "自訂",
                             "high": "高",
                             "medium": "中",
                             "low": "低",