Parcourir la source

fix: use correct logic for mapping availability

Jason Rumney il y a 6 mois
Parent
commit
edec482d72
1 fichiers modifiés avec 1 ajouts et 2 suppressions
  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