소스 검색

fix: use correct logic for mapping availability

Jason Rumney 10 달 전
부모
커밋
edec482d72
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      custom_components/tuya_local/helpers/device_config.py

+ 1 - 2
custom_components/tuya_local/helpers/device_config.py

@@ -901,8 +901,7 @@ class TuyaDpsConfig:
                 )
             )
             for cond in conditions:
-                avail_dp = cond.get("available")
-                if avail_dp and not self.mapping_available(avail_dp, device):
+                if not self.mapping_available(cond, device):
                     continue
                 if c_val is not None and (_equal_or_in(c_val, cond.get("dps_val"))):
                     c_match = cond