-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch the device list a 2nd time to make sure we have the local key #306
Conversation
@@ -213,7 +226,10 @@ def wizard(color=True, retries=None, forcescan=False, nocloud=False): | |||
print('\n\n' + bold + 'Unable to save raw file' + dim ) | |||
|
|||
# Find out if we should poll all devices | |||
answer = input(subbold + '\nPoll local devices? ' + normal + '(Y/n): ') | |||
if quicklist: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -18,7 +18,7 @@ | |||
getfunctions(deviceid) | |||
getproperties(deviceid) | |||
getdps(deviceid) | |||
sendcommand(deviceid, commands) | |||
sendcommand(deviceid, commands [, uri]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
users[dev['uid']] = True | ||
if users: | ||
# we have at least 1 user id, so fetch the device list again to make sure we have the local key | ||
# this also gets us the gateway_id for child devices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this!
Nice... I like the merge approach rather than scanning every ID with missing local_key's. Testing... Do we want to try to get any of the draft changes in on this release? I think this could go out as v1.12.1. |
To keep it clean (and small batch changes), I released this PR as v1.12.1 (see https://pypi.org/project/tinytuya/1.12.1/). |
Closes #305