Browse Source

Ledvance PLABL100x25b: avoid looping when value mirroring

Avoid an infinite loop trying to resolve values between available and switch
by mirroring the raw value of switch rather than the decoded value which
can mirror back to available.

Found when investigating matching in issue #3280
Jason Rumney 10 months ago
parent
commit
55a062ae2c

+ 12 - 2
custom_components/tuya_local/devices/ledvance_smart_plabl100x25b.yaml

@@ -20,10 +20,15 @@ entities:
         mapping:
         mapping:
           - dps_val: true
           - dps_val: true
             value: true
             value: true
-            constraint: switch
+            constraint: raw_switch
             conditions:
             conditions:
               - dps_val: null
               - dps_val: null
                 value: false
                 value: false
+      - id: 51
+        type: base64
+        optional: true
+        name: raw_switch
+        hidden: true
       - id: 51
       - id: 51
         type: base64
         type: base64
         mask: "000100000000000000000000"
         mask: "000100000000000000000000"
@@ -89,10 +94,15 @@ entities:
         mapping:
         mapping:
           - dps_val: true
           - dps_val: true
             value: true
             value: true
-            constraint: switch
+            constraint: raw_switch
             conditions:
             conditions:
               - dps_val: null
               - dps_val: null
                 value: false
                 value: false
+      - id: 51
+        type: base64
+        optional: true
+        name: raw_switch
+        hidden: true
       - id: 51
       - id: 51
         type: base64
         type: base64
         mask: "000200000000000000000000"
         mask: "000200000000000000000000"