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

New devices TrueLife Air purrifier P3 and P7

Garthcz 9 месяцев назад
Родитель
Сommit
5212abf779

+ 118 - 0
custom_components/tuya_local/devices/truelife_air_purrifier_p3.yaml

@@ -0,0 +1,118 @@
+name: Air Purifier
+products:
+  - id: pc3mcvhmyfponsqf
+    manufacturer: "TrueLife"
+    model: "Air Purifier P3 WIFI"
+entities:
+  - entity: fan
+    icon: "mdi:air-purifier"
+    translation_only_key: fan_with_presets
+    dps:
+    - id: 1
+      type: boolean
+      name: switch
+    - id: 3
+      name: preset_mode
+      type: string
+      mapping:
+        - dps_val: AUTO
+          value: smart
+        - dps_val: SLEEP
+          value: sleep
+        - dps_val: MANUAL
+          value: manual
+  - entity: select
+    name: Fan Speed
+    icon: "mdi:fan"
+    category: config
+    dps:
+      - id: 4
+        type: string
+        name: option
+        mapping:
+        - dps_val: LOW
+          value: low
+        - dps_val: MID
+          value: medium
+        - dps_val: HI
+          value: high
+  - entity: sensor
+    class: pm25
+    category: diagnostic
+    dps:
+      - id: 2
+        type: integer
+        name: sensor
+        unit: ugm3
+  - entity: switch
+    translation_key: ionizer
+    category: config
+    dps:
+      - id: 6
+        type: boolean
+        name: switch
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 7
+        type: boolean
+        name: lock
+  - entity: switch
+    translation_key: uv_sterilization
+    category: config
+    dps:
+      - id: 9
+        type: boolean
+        name: switch
+  - entity: button
+    translation_key: filter_reset
+    category: config
+    dps:
+      - id: 11
+        type: boolean
+        name: button
+  - entity: sensor
+    name: Filter Usage (hours)
+    icon: "mdi:calendar-clock"
+    category: diagnostic
+    dps:
+      - id: 16
+        type: integer
+        name: sensor
+        unit: h
+  - entity: select
+    translation_key: timer
+    category: config
+    dps:
+      - id: 19
+        type: string
+        name: option
+        mapping:
+          - dps_val: cancle
+            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
+  - entity: sensor
+    name: Timer Remaining
+    icon: "mdi:timer-sand"
+    category: diagnostic
+    dps:
+      - id: 20
+        type: integer
+        name: sensor
+        unit: min

+ 118 - 0
custom_components/tuya_local/devices/truelife_air_purrifier_p7.yaml

@@ -0,0 +1,118 @@
+name: Air Purifier
+products:
+  - id: lpmzzlrklbkvsizu
+    manufacturer: "TrueLife"
+    model: "Air Purifier P7 WIFI"
+entities:
+  - entity: fan
+    icon: "mdi:air-purifier"
+    translation_only_key: fan_with_presets
+    dps:
+    - id: 1
+      type: boolean
+      name: switch
+    - id: 3
+      name: preset_mode
+      type: string
+      mapping:
+        - dps_val: AUTO
+          value: smart
+        - dps_val: SLEEP
+          value: sleep
+        - dps_val: MANUAL
+          value: manual
+  - entity: select
+    name: Fan Speed
+    icon: "mdi:fan"
+    category: config
+    dps:
+      - id: 4
+        type: string
+        name: option
+        mapping:
+        - dps_val: LOW
+          value: low
+        - dps_val: MID
+          value: medium
+        - dps_val: HI
+          value: high
+  - entity: sensor
+    class: pm25
+    category: diagnostic
+    dps:
+      - id: 2
+        type: integer
+        name: sensor
+        unit: ugm3
+  - entity: switch
+    translation_key: ionizer
+    category: config
+    dps:
+      - id: 6
+        type: boolean
+        name: switch
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 7
+        type: boolean
+        name: lock
+  - entity: switch
+    translation_key: uv_sterilization
+    category: config
+    dps:
+      - id: 9
+        type: boolean
+        name: switch
+  - entity: button
+    translation_key: filter_reset
+    category: config
+    dps:
+      - id: 11
+        type: boolean
+        name: button
+  - entity: sensor
+    name: Filter Usage (hours)
+    icon: "mdi:calendar-clock"
+    category: diagnostic
+    dps:
+      - id: 16
+        type: integer
+        name: sensor
+        unit: h
+  - entity: select
+    translation_key: timer
+    category: config
+    dps:
+      - id: 18
+        type: string
+        name: option
+        mapping:
+          - dps_val: cancle
+            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
+  - entity: sensor
+    name: Timer Remaining
+    icon: "mdi:timer-sand"
+    category: diagnostic
+    dps:
+      - id: 19
+        type: integer
+        name: sensor
+        unit: min