Просмотр исходного кода

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 год назад
Родитель
Сommit
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: