Browse Source

Add support for EFENZ Kith ceiling fan (#4269)

* Add custom configuration for EFENZ Kith ceiling fan

* Update comments to conform to lint rules

* Second attempt at yamllint fix

* feat (efenz_kith_fanlight): naming tweaks

- include device type in filename to make it easier for users to find the right file if their device is a rebrand
- remove unnecessary name override from product
- add translation_key to fan so presets get translated

PR #4269

* feat (efenz_kith_fanlight): add dp 1 as main switch

Added switch for dp 1 but made it config, because probably the other 2 individual switches are more useful.
Disable fan and light entities when the main switch is off to avoid misleading the user into thinking they can control them.

PR #4269

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Sim Kai Long 1 month ago
parent
commit
3ee86b899d
1 changed files with 72 additions and 0 deletions
  1. 72 0
      custom_components/tuya_local/devices/efenz_kith_fanlight.yaml

+ 72 - 0
custom_components/tuya_local/devices/efenz_kith_fanlight.yaml

@@ -0,0 +1,72 @@
+name: Ceiling Fan
+products:
+  - id: knhfgnbpneqras2y
+    manufacturer: EFENZ
+    model: Kith
+entities:
+  - entity: fan
+    translation_key: fan_with_presets
+    dps:
+      # Use id 101 instead of "1" for fan control.
+      # "1" will turn off the entire unit, fan and light included.
+      - id: 101
+        type: boolean
+        name: switch
+        optional: true
+      - id: 2
+        type: string
+        name: preset_mode
+        optional: true
+        mapping:
+          - dps_val: "other"
+            value: normal
+          - dps_val: "nature"
+            value: nature
+          - dps_val: "sleep"
+            value: sleep
+          - value: normal
+            hidden: true
+      - id: 3
+        type: integer
+        name: speed
+        range:
+          min: 1
+          max: 5
+      - id: 8
+        type: string
+        optional: true
+        name: direction
+      - id: 1
+        type: boolean
+        name: available
+  - entity: light
+    dps:
+      - id: 15
+        type: boolean
+        name: switch
+      - id: 16
+        type: integer
+        name: brightness
+        range:
+          min: 10
+          max: 1000
+      - id: 17
+        type: integer
+        name: color_temp
+        range:
+          min: 0
+          max: 1000
+        mapping:
+          - target_range:
+              min: 2700
+              max: 6500
+      - id: 1
+        type: boolean
+        name: available
+  - entity: switch
+    name: Power
+    category: config
+    dps:
+      - id: 1
+        type: boolean
+        name: switch