ソースを参照

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: