Skip to content

Conversation

uzlonewolf
Copy link
Collaborator

Closes #305


# Find out if we should poll all devices
answer = input(subbold + '\nPoll local devices? ' + normal + '(Y/n): ')
if quicklist:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

getproperties(deviceid)
getdps(deviceid)
sendcommand(deviceid, commands)
sendcommand(deviceid, commands [, uri])
Copy link
Owner

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this!

@jasonacox jasonacox merged commit eba92e2 into jasonacox:master Mar 21, 2023
@jasonacox
Copy link
Owner

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.

@uzlonewolf
Copy link
Collaborator Author

Up to you. Only reason I left #308 as a draft was because by the time I was done I was too tired to test it as much as I wanted. #300 is going to require some slight updates after these 2 are merged.

@jasonacox
Copy link
Owner

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/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wizard doesn't pull local_key for some devices
2 participants