Explorar el Código

Add AtmosC A Series air purifier (#5350)

* Add AtmosC A Series air purifier

* Update and rename atmosc_a_series.yaml to Apply review feedback and move file to devices directory

Apply review feedback and move file to devices directory

* fix(atmosc_aseries_airpurifier): follow naming conventions

- follow HA convention for device naming
- follow this project's convention for file names, so the type of device is obvious to other users trying to match compatible but different branded devices.

* Update speed values and preset mode mappings

Speed is expected to be in the range 0-100 when it reaches HA.
Since we are mapping discrete values here, we should map directly to the end values.
Trim unnecessary quotes from preset strings

---------

Co-authored-by: Jason Rumney <make-all@users.noreply.github.com>
ralphxtrem hace 4 días
padre
commit
3b818f661b

+ 78 - 0
custom_components/tuya_local/devices/atmosc_aseries_airpurifier.yaml

@@ -0,0 +1,78 @@
+name: Air purifier
+products:
+  - id: acgosool4azuaz5g
+    manufacturer: AtmosC
+    model: A Series
+entities:
+  - entity: fan
+    translation_key: air_purifier
+    dps:
+      - id: 1
+        name: switch
+        type: boolean
+      - id: 4
+        name: speed
+        type: string
+        mapping:
+          - dps_val: "1"
+            value: 12
+          - dps_val: "2"
+            value: 25
+          - dps_val: "3"
+            value: 37
+          - dps_val: "4"
+            value: 50
+          - dps_val: "5"
+            value: 62
+          - dps_val: "6"
+            value: 75
+          - dps_val: "7"
+            value: 87
+          - dps_val: "8"
+            value: 100
+      - id: 3
+        name: preset_mode
+        type: string
+        mapping:
+          - dps_val: Manual
+            value: manual
+          - dps_val: Auto
+            value: auto
+          - dps_val: Sleep
+            value: sleep
+  - entity: sensor
+    class: pm25
+    dps:
+      - id: 2
+        name: sensor
+        class: measurement
+        type: integer
+        unit: ugm3
+  - entity: switch
+    translation_key: ionizer
+    category: config
+    dps:
+      - id: 6
+        name: switch
+        type: boolean
+  - entity: switch
+    translation_key: uv_sterilization
+    category: config
+    dps:
+      - id: 9
+        name: switch
+        type: boolean
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 7
+        name: lock
+        type: boolean
+  - entity: sensor
+    translation_key: filter_life
+    category: config
+    dps:
+      - id: 17
+        name: sensor
+        type: integer