Skip to content

Commit

Permalink
Cloud getdevices() bug #381
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonacox committed Jul 4, 2023
1 parent b329dd0 commit f7cf7ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tinytuya/Cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def getdevices(self, verbose=False, oldlist=[], include_map=False):
changed_devices = []
unchanged_devices = []

# chect to see if anything has changed. if so, re-download factory-infos and DP mapping
# check to see if anything has changed. if so, re-download factory-infos and DP mapping
for dev in devs:
dev_id = dev['id']
if dev_id not in old_devices:
Expand All @@ -487,7 +487,7 @@ def getdevices(self, verbose=False, oldlist=[], include_map=False):
continue
is_same = True
for k in DEVICEFILE_SAVE_VALUES:
if k in dev and k != 'icon' and k != 'last_ip' and old[k] != dev[k]:
if (k not in old) or (k in dev and k != 'icon' and k != 'last_ip' and old[k] != dev[k]):
is_same = False
break
if not is_same:
Expand Down

0 comments on commit f7cf7ef

Please sign in to comment.