Преглед изворни кода

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 пре 1 година
родитељ
комит
74442079a3
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      custom_components/tuya_local/helpers/device_config.py

+ 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: