Pyhass / Pyhiveapi

A python library to interface with the hive home api
MIT License
24 stars 18 forks source link

[FEATURE] Example login script #68

Open davet2001 opened 1 year ago

davet2001 commented 1 year ago

Is your feature request related to a problem? Please describe. When trying to get the library to work standalone, I find I lack a concrete working example of how to log in, perform SMS_MFA, then save the resulting tokens to a file.

Describe the solution you'd like I would like the project include a file such as example_login.py, that I could run, be prompted for username/password, and for the tokens to be saved to a file in the working directory. It should perform a simple function like listing the connected devices. When I run the file again, it should log in using the newly saved file, not trigger a 2FA challenge, and list the same connected devices.

Additional context This part of getting the library to work is very time consuming to debug.