Parcourir la source

Arlec tower fan: add model info, use range for speed

PR #3139
Jason Rumney il y a 10 mois
Parent
commit
eee806075c
1 fichiers modifiés avec 5 ajouts et 26 suppressions
  1. 5 26
      custom_components/tuya_local/devices/arlec_fan_atf4602bha.yaml

+ 5 - 26
custom_components/tuya_local/devices/arlec_fan_atf4602bha.yaml

@@ -2,6 +2,7 @@ name: Fan
 products:
   - id: a0afnelsa0poigzr
     manufacturer: Arlec
+    model: ATF4602BHA
     name: Tower fan
 entities:
   - entity: fan
@@ -23,31 +24,9 @@ entities:
       - id: 3
         name: speed
         type: integer
-        mapping:
-          - dps_val: 1
-            value: 8
-          - dps_val: 2
-            value: 17
-          - dps_val: 3
-            value: 25
-          - dps_val: 4
-            value: 33
-          - dps_val: 5
-            value: 42
-          - dps_val: 6
-            value: 50
-          - dps_val: 7
-            value: 58
-          - dps_val: 8
-            value: 67
-          - dps_val: 9
-            value: 75
-          - dps_val: 10
-            value: 83
-          - dps_val: 11
-            value: 92
-          - dps_val: 12
-            value: 100
+        range:
+          min: 1
+          max: 12
       - id: 5
         name: oscillate
         type: boolean
@@ -59,7 +38,7 @@ entities:
         type: string
         name: option
         mapping:
-          - dps_val: "cancel"
+          - dps_val: cancel
             value: cancel
           - dps_val: "1_0"
             value: "1h"