Skip to content

Commit e49b1fb

Browse files
committed
Cloud pull allow empty values to be pulled. rospogrigio#189
1 parent ea2385d commit e49b1fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/localtuya/config_flow.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def dps_string_list(dps_data: dict[str, dict], cloud_dp_codes: dict[str, dict])
262262
for dp, func in cloud_dp_codes.items():
263263
# Default Manual dp value is -1, we will replace it if it in cloud.
264264
add_dp = dp not in dps_data or dps_data.get(dp) == -1
265-
if add_dp and (value := str(func.get("value"))):
265+
if add_dp and (value := func.get("value") and value is not None):
266266
dps_data[dp] = f"{value}, cloud pull"
267267

268268
for dp, value in dps_data.items():

0 commit comments

Comments
 (0)