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

Add support for Jafanda JF500 air purifier (#4238)

* Add Jafanda JF500 air purifier

* Remove filter_reset icon override as per PR feedback

* fix (jafanda_jf500_airpurifier): rename file and cleanup whitespace

- follow convention of ending the filename with device type, to make it easier for users to decide which config to try if they have multiple matches for a different branded device.
- remove extra blank lines that GitHub web editor always adds.

PR #4238

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
Dominic Wrapson 1 месяц назад
Родитель
Сommit
197c9b45eb
1 измененных файлов с 109 добавлено и 0 удалено
  1. 109 0
      custom_components/tuya_local/devices/jafanda_jf500_airpurifier.yaml

+ 109 - 0
custom_components/tuya_local/devices/jafanda_jf500_airpurifier.yaml

@@ -0,0 +1,109 @@
+name: Air purifier
+products:
+  - id: vpb3fd5rhtgd7b4t
+    manufacturer: Jafanda
+    model: JF500
+
+entities:
+  - entity: fan
+    translation_key: fan_with_presets
+    dps:
+      - id: 1
+        type: boolean
+        name: switch
+      - id: 3
+        type: string
+        name: preset_mode
+        mapping:
+          - dps_val: manual
+            value: manual
+          - dps_val: auto
+            value: auto
+      - id: 101
+        type: integer
+        name: speed
+        range:
+          min: 1
+          max: 5
+
+  - entity: sensor
+    class: pm25
+    dps:
+      - id: 2
+        type: integer
+        name: sensor
+        unit: ugm3
+        class: measurement
+
+  - entity: sensor
+    name: Filter life
+    category: diagnostic
+    icon: "mdi:air-filter"
+    dps:
+      - id: 5
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 7
+        type: boolean
+        name: lock
+
+  - entity: button
+    translation_key: filter_reset
+    category: config
+    dps:
+      - id: 11
+        type: boolean
+        name: button
+
+  - entity: sensor
+    translation_key: air_quality
+    class: enum
+    dps:
+      - id: 21
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: excellent
+            value: excellent
+          - dps_val: good
+            value: good
+          - dps_val: average
+            value: moderate
+          - dps_val: poor
+            value: poor
+
+  - entity: light
+    name: Dial lighting
+    icon: "mdi:knob"
+    category: config
+    dps:
+      - id: 103
+        name: brightness
+        type: string
+        mapping:
+          - dps_val: lightoff
+            value: 0
+          - dps_val: fifty_percent
+            value: 128
+          - dps_val: a_hundred_percent
+            value: 255
+
+  - entity: number
+    translation_key: timer
+    class: duration
+    category: config
+    dps:
+      - id: 102
+        type: integer
+        name: value
+        unit: h
+        range:
+          min: 0
+          max: 12