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

Handle AttributeError #18

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

matriphe
Copy link

@matriphe matriphe commented May 21, 2024

This PR fixes the issue #16.

When the device is disconnected from Speedport, the router removes the device from the list and makes the device to None state. Whenever the device is requested for an attribute, because of None, it throws the AttributeError.

I tested these changes on my Speedport.

When the device is connected to Wi-Fi.

FireShot Capture 175 - Developer tools – Home Assistant - assistant home matriphe net

Then when I disconnected my device, it shows below.

FireShot Capture 176 - Developer tools – Home Assistant - assistant home matriphe net

I'm not good at Python, and I know that this solution is quick and dirty, but it works!

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.

None yet

1 participant