Skip to content

Commit

Permalink
Ensure replaced is set before checking.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
make-all committed Jul 7, 2024
1 parent 4e25f86 commit 7444207
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/tuya_local/helpers/device_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ def _map_from_dps(self, val, device):

result = val
scale = self.scale(device)
replaced = False

mapping = self._find_map_for_dps(val)
if mapping:
Expand Down

0 comments on commit 7444207

Please sign in to comment.