Skip to content

Commit

Permalink
Cloud pull allow empty values to be pulled. #189
Browse files Browse the repository at this point in the history
  • Loading branch information
xZetsubou committed Apr 8, 2024
1 parent ea2385d commit e49b1fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/localtuya/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def dps_string_list(dps_data: dict[str, dict], cloud_dp_codes: dict[str, dict])
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 add_dp and (value := str(func.get("value"))):
if add_dp and (value := func.get("value") and value is not None):
dps_data[dp] = f"{value}, cloud pull"

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

0 comments on commit e49b1fb

Please sign in to comment.