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

Wistar blinds: adjustments based on feedback

- swap stop and close command values.  Order does not match iot.tuya.com docs
- add Venetian blinds at start and remove Other at end of style values.
- restrict open and closed commands to when border is set to avoid destroying blinds. position will still be available for fine setting at user's risk.

Issue #228
Jason Rumney 3 лет назад
Родитель
Сommit
f33b8eb455
1 измененных файлов с 22 добавлено и 14 удалено
  1. 22 14
      custom_components/tuya_local/devices/wistar_roller_blind.yaml

+ 22 - 14
custom_components/tuya_local/devices/wistar_roller_blind.yaml

@@ -11,10 +11,18 @@ primary_entity:
       mapping:
         - dps_val: "0"
           value: open
+          constraint: border_state
+          conditions:
+            - dps_val: false
+              invalid: true
         - dps_val: "1"
-          value: stop
-        - dps_val: "2"
           value: close
+          constraint: border_state
+          conditions:
+            - dps_val: false
+              invalid: true
+        - dps_val: "2"
+          value: stop
     - id: 102
       type: integer
       name: position
@@ -108,29 +116,29 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: "0"
-            value: Sihousette blind
+            value: Venetian blind
           - dps_val: "1"
-            value: Roman blind
+            value: Silhouette blind
           - dps_val: "2"
-            value: Roller blind
+            value: Roman blind
           - dps_val: "3"
-            value: Soft blind
+            value: Roller blind
           - dps_val: "4"
-            value: Roller shutter
+            value: Soft blind
           - dps_val: "5"
-            value: Honeycomb blind
+            value: Roller shutter
           - dps_val: "6"
-            value: Pleated blind
+            value: Honeycomb blind
           - dps_val: "7"
-            value: Roller door
+            value: Pleated blind
           - dps_val: "8"
-            value: Awning
+            value: Roller door
           - dps_val: "9"
-            value: Curtain
+            value: Awning
           - dps_val: "10"
-            value: Roman pole
+            value: Curtain
           - dps_val: "11"
-            value: Other
+            value: Roman pole
   - entity: switch
     category: config
     name: Reversed