Skip to content

Commit

Permalink
fix(config_flow): remove cloud pull label if dp exists locally
Browse files Browse the repository at this point in the history
  • Loading branch information
xZetsubou committed Jan 17, 2025
1 parent 2d6b4f0 commit caa418c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/localtuya/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1100,8 +1100,8 @@ def dps_string_list(dps_data: dict[str, dict], cloud_dp_codes: dict[str, dict])
# Merge DPs that found through cloud with local.
for dp, func in cloud_dp_codes.items():
# Default Manual dp value is -1, we will replace it if it in cloud.
add_dp = dp not in dps_data or dps_data.get(dp) == -1
if (value := func.get("value", "")) or add_dp:
if dp not in dps_data or dps_data.get(dp) == -1:
value = func.get("value", "")
dps_data[dp] = f"{value}, cloud pull"

for dp, value in dps_data.items():
Expand Down

0 comments on commit caa418c

Please sign in to comment.