Procházet zdrojové kódy

Ensure replaced is set before checking.

Since it is now possible that we replace a value without a mapping, we
need to ensure that replaced is set even when there is no mapping.

Discussion #2080
Jason Rumney před 1 rokem
rodič
revize
74442079a3

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

@@ -661,6 +661,7 @@ class TuyaDpsConfig:
 
         result = val
         scale = self.scale(device)
+        replaced = False
 
         mapping = self._find_map_for_dps(val)
         if mapping: