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

feat(devices): add support for Kavunion C1 100 ventilation fan

Issue #3513
Jason Rumney 7 месяцев назад
Родитель
Сommit
eb4a294155

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -1018,3 +1018,4 @@ Further device support has been made with the assistance of users. Please consid
 - [pranjal-joshi](https://github.com/pranjal-joshi) for contributing support for Aziot 7 and 8 gang multi-switches.
 - [AFumi39](https://github.com/AFumi39) for contributing support for Puppy Kitty F14-W pet feeder.
 - [hussainaljamri](https://github.com/hussainaljamri) for contributing support for Moes Star Feather series switches.
+- [FritzeF](https://github.com/FritzeF) for assisting with support for Kavunion C1 100 ventilation fan.

+ 1 - 0
DEVICES.md

@@ -289,6 +289,7 @@
 - Hunter Pacific 9 speed ceiling fan with light
 - HYD WeAir Plus bladeless fan with heating function
 - Immax Neo Lite Vento ceiling fan with light
+- Kavunion C1 100 ventilation fan
 - Klarstein Skyscaper Ice cooling fan
 - Klarstein Skytower Grand Smart cooling fan
 - Ledkia fan and light controller

+ 299 - 0
custom_components/tuya_local/devices/kavunion_c1_ventilationfan.yaml

@@ -0,0 +1,299 @@
+name: Ventilation fan
+products:
+  - id: sr1eqkpkk4fxa3gw
+    manufacturer: Kavunion
+    model: "C1 100"
+entities:
+  - entity: switch
+    # Apparently does not do anything
+    hidden: true
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+  - entity: fan
+    translation_key: ventilation
+    dps:
+      - id: 2
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: "on"
+            value: "on"
+          - dps_val: "off"
+            value: "off"
+          - dps_val: timer
+            value: timer
+          - dps_val: auto
+            value: auto
+      - id: 12
+        type: string
+        name: speed
+        mapping:
+          - constraint: preset_mode
+            conditions:
+              - dps_val: auto
+                value_redirect: auto_speed
+              - dps_val: ["on", timer, "off"]
+                mapping:
+                  - dps_val: f1
+                    value: 0
+                  - dps_val: f2
+                    value: 20
+                  - dps_val: f3
+                    value: 40
+                  - dps_val: f4
+                    value: 60
+                  - dps_val: f5
+                    value: 80
+                  - dps_val: f6
+                    value: 100
+      - id: 116
+        type: string
+        name: auto_speed
+        hidden: true
+        mapping:
+          - dps_val: f1
+            value: 0
+          - dps_val: f2
+            value: 20
+          - dps_val: f3
+            value: 40
+          - dps_val: f4
+            value: 60
+          - dps_val: f5
+            value: 80
+          - dps_val: f6
+            value: 100
+      - id: 119
+        type: integer
+        name: customer_id
+  - entity: climate
+    translation_key: thermostat
+    dps:
+      - id: 2
+        type: string
+        name: hvac_mode
+        mapping:
+          - dps_val: auto
+            value: fan_only
+          - dps_val: "off"
+            value: "off"
+          - value: "off"
+            hidden: true
+      - id: 9
+        type: integer
+        name: current_temperature
+        mapping:
+          - scale: 10
+            constraint: temperature_unit
+            conditions:
+              - dps_val: f
+                value_redirect: temp_f
+      - id: 45
+        type: integer
+        name: target_temp_high
+        range:
+          min: 1
+          max: 45
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: f
+                value_redirect: htemp_setf
+                range:
+                  min: 33
+                  max: 113
+      - id: 102
+        type: integer
+        name: target_temp_low
+        range:
+          min: 1
+          max: 45
+        mapping:
+          - constraint: temperature_unit
+            conditions:
+              - dps_val: f
+                value_redirect: ltemp_setf
+                range:
+                  min: 33
+                  max: 113
+      - id: 105
+        type: string
+        name: temperature_unit
+        mapping:
+          - dps_val: f
+            value: F
+          - value: C
+      - id: 114
+        type: integer
+        name: htemp_setf
+        hidden: true
+        range:
+          min: 33
+          max: 113
+      - id: 115
+        type: integer
+        name: ltemp_setf
+        hidden: true
+        range:
+          min: 33
+          max: 113
+      - id: 117
+        type: integer
+        name: temp_f
+        hidden: true
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: humidity
+    dps:
+      - id: 8
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: number
+    name: High humidity threshold
+    class: humidity
+    dps:
+      - id: 46
+        type: integer
+        name: value
+        unit: "%"
+        range:
+          min: 1
+          max: 99
+      - id: 109
+        type: boolean
+        name: available
+  - entity: number
+    name: Low humidity threshold
+    class: humidity
+    dps:
+      - id: 103
+        type: integer
+        name: value
+        unit: "%"
+        range:
+          min: 1
+          max: 99
+      - id: 110
+        type: boolean
+        name: available
+  - entity: sensor
+    name: Fan speed
+    category: diagnostic
+    dps:
+      - id: 101
+        type: integer
+        name: sensor
+        unit: rpm
+        class: measurement
+  - entity: time
+    translation_key: timer
+    dps:
+      - id: 104
+        type: integer
+        name: second
+        range:
+          min: 0
+          max: 86400
+      - id: 111
+        type: boolean
+        name: available
+  - entity: select
+    translation_key: temperature_unit
+    category: config
+    dps:
+      - id: 105
+        type: string
+        name: option
+        mapping:
+          - dps_val: c
+            value: celsius
+          - dps_val: f
+            value: fahrenheit
+  - entity: select
+    name: Auto trigger
+    category: config
+    dps:
+      - id: 106
+        type: string
+        name: option
+        mapping:
+          - dps_val: ht
+            value: High temperature
+          - dps_val: lt
+            value: Low temperature
+          - dps_val: hh
+            value: High humidity
+          - dps_val: lh
+            value: Low humidity
+  - entity: switch
+    name: High temperature
+    category: config
+    dps:
+      - id: 107
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Low temperature
+    category: config
+    dps:
+      - id: 108
+        type: boolean
+        name: switch
+  - entity: switch
+    name: High humidity
+    category: config
+    dps:
+      - id: 109
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Low humidity
+    category: config
+    dps:
+      - id: 110
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Timer
+    category: config
+    dps:
+      - id: 111
+        type: boolean
+        name: switch
+  - entity: light
+    translation_key: display
+    category: config
+    dps:
+      - id: 112
+        name: brightness
+        type: string
+        mapping:
+          - dps_val: B0
+            value: 0
+          - dps_val: B1
+            value: 128
+          - dps_val: B2
+            value: 255
+  - entity: binary_sensor
+    name: FG signal
+    class: connectivity
+    category: diagnostic
+    dps:
+      - id: 113
+        type: boolean
+        name: sensor
+  - entity: binary_sensor
+    name: Temperature sensor
+    class: plugged
+    category: diagnostic
+    dps:
+      - id: 118
+        type: boolean
+        name: sensor

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

@@ -365,7 +365,10 @@
                             "eco": "Еко",
                             "anti-condensation": "Антиконденз",
                             "extractor": "Екстрактор",
-                            "heat_recovery": "Възстановяване на топлината"
+                            "heat_recovery": "Възстановяване на топлината",
+                            "timer": "Таймер",
+                            "on": "Включено",
+                            "off": "Изключено"
                         }
                     }
                 }

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

@@ -530,7 +530,10 @@
                             "eco": "Ecològic",
                             "anti-condensation": "Anticondensació",
                             "extractor": "Extractor",
-                            "heat_recovery": "Recuperació de calor"
+                            "heat_recovery": "Recuperació de calor",
+                            "timer": "Temporitzador",
+                            "on": "Activat",
+                            "off": "Desactivat"
                         }
                     }
                 }

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

@@ -365,7 +365,10 @@
                             "eco": "Eco",
                             "anti-condensation": "Proti kondenzaci",
                             "extractor": "Odsávání",
-                            "heat_recovery": "Ovzduší"
+                            "heat_recovery": "Ovzduší",
+                            "timer": "Časovač",
+                            "on": "Zapnuto",
+                            "off": "Vypnuto"
                         }
                     }
                 }

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

@@ -364,7 +364,10 @@
                             "eco": "Eco",
                             "anti-condensation": "Anti-Kondensation",
                             "extractor": "Abluft",
-                            "heat_recovery": "Wärmerückgewinnung"
+                            "heat_recovery": "Wärmerückgewinnung",
+                            "timer": "Timer",
+                            "on": "An",
+                            "off": "Aus"
                         }
                     }
                 }

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

@@ -365,7 +365,10 @@
                             "eco": "Οικονομικό",
                             "anti-condensation": "Αποφυγή υγρασίας",
                             "extractor": "Εξαγωγή",
-                            "heat_recovery": "Ανάκτηση θερμότητας"
+                            "heat_recovery": "Ανάκτηση θερμότητας",
+                            "timer": "Χρονοδιακόπτης",
+                            "on": "Ενεργοποίηση",
+                            "off": "Απενεργοποίηση"
                         }
                     }
                 }

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

@@ -365,7 +365,10 @@
                             "eco": "Eco",
                             "anti-condensation": "Anti-condensation",
                             "extractor": "Extractor",
-                            "heat_recovery": "Heat recovery"
+                            "heat_recovery": "Heat recovery",
+                            "timer": "Timer",
+                            "on": "On",
+                            "off": "Off"
                         }
                     }
                 }

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

@@ -365,7 +365,10 @@
                             "eco": "Ecológico",
                             "anti-condensation": "Anticondensación",
                             "extractor": "Extractor",
-                            "heat_recovery": "Recuperación de calor"
+                            "heat_recovery": "Recuperación de calor",
+                            "timer": "Temporizador",
+                            "on": "Encender",
+                            "off": "Apagar"
                         }
                     }
                 }

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

@@ -365,7 +365,10 @@
                             "eco": "Écologique",
                             "anti-condensation": "Anti-condensation",
                             "extractor": "Extracteur",
-                            "heat_recovery": "Récupération de chaleur"
+                            "heat_recovery": "Récupération de chaleur",
+                            "timer": "Minuteur",
+                            "on": "Allumé",
+                            "off": "Éteint"
                         }
                     }
                 }

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

@@ -366,7 +366,10 @@
                             "eco": "Eco",
                             "anti-condensation": "Pára mentesítés",
                             "extractor": "Kivonat",
-                            "heat_recovery": "Hővisszanyerés"
+                            "heat_recovery": "Hővisszanyerés",
+                            "timer": "Időzítő",
+                            "on": "Be",
+                            "off": "Ki"
                         }
                     }
                 }

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

@@ -365,7 +365,10 @@
                             "eco": "Hemat",
                             "anti-condensation": "Anti kondensasi",
                             "extractor": "Ekstraktor",
-                            "heat_recovery": "Pemulihan panas"
+                            "heat_recovery": "Pemulihan panas",
+                            "timer": "Pengatur waktu",
+                            "on": "Hidup",
+                            "off": "Mati"
                         }
                     }
                 }

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

@@ -366,7 +366,10 @@
                             "eco": "Eco",
                             "anti-condensation": "Anticondensa",
                             "extractor": "Estrattore",
-                            "heat_recovery": "Recupero di calore"
+                            "heat_recovery": "Recupero di calore",
+                            "timer": "Timer",
+                            "on": "Acceso",
+                            "off": "Spento"
                         }
                     }
                 }

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

@@ -365,7 +365,10 @@
                             "eco": "エコ",
                             "anti-condensation": "結露防止",
                             "extractor": "抽出",
-                            "heat_recovery": "熱回収"
+                            "heat_recovery": "熱回収",
+                            "timer": "タイマー",
+                            "on": "オン",
+                            "off": "オフ"
                         }
                     }
                 }

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

@@ -366,7 +366,10 @@
                             "eco": "Øko",
                             "anti-condensation": "Anti-kondens",
                             "extractor": "Ekstraktor",
-                            "heat_recovery": "Varmeutvinning"
+                            "heat_recovery": "Varmeutvinning",
+                            "timer": "Timer",
+                            "on": "På",
+                            "off": "Av"
                         }
                     }
                 }

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

@@ -365,7 +365,10 @@
                             "eco": "Eco",
                             "anti-condensation": "Zapobieganie kondensacji",
                             "extractor": "Wyciąg",
-                            "heat_recovery": "Odzysk ciepła"
+                            "heat_recovery": "Odzysk ciepła",
+                            "timer": "Regulator czasowy",
+                            "on": "Włączony",
+                            "off": "Wyłączony"
                         }
                     }
                 }

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

@@ -365,7 +365,10 @@
                             "eco": "Ecológico",
                             "anti-condensation": "Anti-condensação",
                             "extractor": "Extrator",
-                            "heat_recovery": "Recuperação de calor"
+                            "heat_recovery": "Recuperação de calor",
+                            "timer": "Temporizador",
+                            "on": "Ligado",
+                            "off": "Desligado"
                         }
                     }
                 }

+ 4 - 1
custom_components/tuya_local/translations/pt-PT.json

@@ -365,7 +365,10 @@
                             "eco": "Ecológico",
                             "anti-condensation": "Anti-condensação",
                             "extractor": "Extrator",
-                            "heat_recovery": "Recuperação de calor"
+                            "heat_recovery": "Recuperação de calor",
+                            "timer": "Temporizador",
+                            "on": "Ligado",
+                            "off": "Desligado"
                         }
                     }
                 }

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

@@ -365,7 +365,10 @@
                             "eco": "Эко",
                             "anti-condensation": "Антиконденсация",
                             "extractor": "Экстрактор",
-                            "heat_recovery": "Тепловосстановление"
+                            "heat_recovery": "Тепловосстановление",
+                            "timer": "Таймер",
+                            "on": "Вкл",
+                            "off": "Выкл"
                         }
                     }
                 }

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

@@ -368,7 +368,10 @@
                             "eco": "Еко",
                             "anti-condensation": "Антиконденсат",
                             "extractor": "Екстрактор",
-                            "heat_recovery": "Відновлення тепла"
+                            "heat_recovery": "Відновлення тепла",
+                            "timer": "Таймер",
+                            "on": "Увімк",
+                            "off": "Вимк"
                         }
                     }
                 }

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

@@ -368,7 +368,10 @@
                             "eco": "ایکو",
                             "anti-condensation": "اینٹی کنڈینسیشن",
                             "extractor": "نکالنے والا",
-                            "heat_recovery": "حرارتی بازیابی"
+                            "heat_recovery": "حرارتی بازیابی",
+                            "timer": "ٹائمر",
+                            "on": "آن",
+                            "off": "آف"
                         }
                     }
                 }

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

@@ -365,7 +365,10 @@
                             "eco": "节能",
                             "anti-condensation": "防凝结",
                             "extractor": "排气",
-                            "heat_recovery": "热回收"
+                            "heat_recovery": "热回收",
+                            "timer": "定时",
+                            "on": "打开",
+                            "off": "关闭"
                         }
                     }
                 }

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

@@ -366,7 +366,10 @@
                             "eco": "節能",
                             "anti-condensation": "防凝結",
                             "extractor": "抽氣",
-                            "heat_recovery": "熱回收"
+                            "heat_recovery": "熱回收",
+                            "timer": "計時",
+                            "on": "開啟",
+                            "off": "關閉"
                         }
                     }
                 }