소스 검색

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 1 년 전
부모
커밋
55a062ae2c
1개의 변경된 파일12개의 추가작업 그리고 2개의 파일을 삭제
  1. 12 2
      custom_components/tuya_local/devices/ledvance_smart_plabl100x25b.yaml

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

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