Explorar o código

Goldair portable air conditioner: Simplify logic for swing modes

Availability logic is too complex and not working as expected.
Simplify by assuming hswing is always available, and only dynamically
handle the vswing modes.

Issue #2567
Jason Rumney hai 1 ano
pai
achega
b98886eaf6

+ 2 - 9
custom_components/tuya_local/goldair_portable_airconditioner.yaml

@@ -94,13 +94,6 @@ primary_entity:
         - dps_val: 2
         - dps_val: 2
           value: true
           value: true
         - value: false
         - value: false
-    - id: 109
-      type: bitfield
-      name: support_bothswing
-      mapping:
-        - dps_val: 3
-          value: true
-        - value: false
     - id: 109
     - id: 109
       type: bitfield
       type: bitfield
       name: support_heat
       name: support_heat
@@ -133,10 +126,10 @@ primary_entity:
           conditions:
           conditions:
             - dps_val: "on"
             - dps_val: "on"
               value: both
               value: both
-              available: support_bothswing
+              available: support_vswing
             - dps_val: "off"
             - dps_val: "off"
               value: horizontal
               value: horizontal
-              available: support_bothswing
+              available: support_vswing
         - dps_val: false
         - dps_val: false
           value: "off"
           value: "off"
           constraint: swing_1
           constraint: swing_1