Skip to content
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

Fixes #1328 #1465

Merged
merged 3 commits into from
Sep 12, 2023
Merged

Fixes #1328 #1465

merged 3 commits into from
Sep 12, 2023

Conversation

Nealium
Copy link

@Nealium Nealium commented Jul 26, 2023

Original Issue: #1328

Restarting HomeAssistant without an external internet connection fails initialization when API is set in config. Tries to get access token and has an uncontrolled crash.

Note: The else in __init.py is because tuya_api.async_get_devices_list() also causes a crash without an internet connection.

This also fixes if there's a non-ok response from the cloud. This might not be beneficial in all cases; Example: having invalid credentials, it might be better to have the crash so the user is aware of the issue. If that is desired I propose having a custom exception instead of waiting until async_get_devices_list fails.

PaulCavill pushed a commit to PaulCavill/localtuya that referenced this pull request Sep 4, 2023
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.

2 participants