Przeglądaj źródła

Add support for Morento air purifier MR5866 (#4764)

* Create morento_mr5866_air_purifier.yaml

* Add MR5866 Air Purifier configuration

* Rename translation_key to name for pm25 sensor

I fixed the failing YAML test by removing the invalid PM2.5 translation_key

* Remove name, icon attributes and fix timer from air purifier entities

Removed icon attributes from various entities, removed name from pm25 and fix timer in the YAML configuration for the Morento MR5866 air purifier.

* fix (morento_mr5866_air_purifier): naming convention

- follow HA naming convention for device name (case)
- remove unnecessary name and model_id from products

PR #4764

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
alfry82 1 dzień temu
rodzic
commit
744a2635cb

+ 104 - 0
custom_components/tuya_local/devices/morento_mr5866_air_purifier.yaml

@@ -0,0 +1,104 @@
+name: Air purifier
+
+products:
+  - id: jzo3p4ltk8kue6yg
+    manufacturer: MORENTO
+    model: MR5866
+
+entities:
+  - entity: fan
+    translation_only_key: fan_with_presets
+    dps:
+      - id: 1
+        name: switch
+        type: boolean
+
+      - id: 3
+        name: preset_mode
+        type: string
+        mapping:
+          - dps_val: auto
+            value: auto
+          - dps_val: sleep
+            value: sleep
+          - dps_val: "1F"
+            value: low
+          - dps_val: "2F"
+            value: medium
+          - dps_val: "3F"
+            value: high
+
+  - entity: sensor
+    class: pm25
+    dps:
+      - id: 2
+        name: sensor
+        type: integer
+        class: measurement
+        unit: ugm3
+
+  - entity: sensor
+    translation_key: filter_life
+    category: diagnostic
+    dps:
+      - id: 5
+        name: sensor
+        type: integer
+        unit: "%"
+
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 7
+        name: lock
+        type: boolean
+
+  - entity: light
+    translation_key: backlight
+    category: config
+    dps:
+      - id: 8
+        name: switch
+        type: boolean
+
+  - entity: button
+    translation_key: filter_reset
+    category: config
+    class: restart
+    dps:
+      - id: 11
+        name: button
+        type: boolean
+
+  - entity: select
+    translation_key: timer
+    category: config
+    dps:
+      - id: 18
+        name: option
+        type: string
+        mapping:
+          - dps_val: cancel
+            value: cancel
+          - dps_val: 2h
+            value: 2h
+          - dps_val: 5h
+            value: 5h
+          - dps_val: 8h
+            value: 8h
+
+  - entity: sensor
+    translation_key: air_quality
+    class: enum
+    dps:
+      - id: 21
+        name: sensor
+        type: string
+        mapping:
+          - dps_val: good
+            value: good
+          - dps_val: moderate
+            value: moderate
+          - dps_val: unhealthy
+            value: severe