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

Merged
merged 2 commits into from
Aug 14, 2024
Merged

Conversation

matriphe
Copy link
Contributor

@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!

Copy link
Owner

@Andre0512 Andre0512 left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@Andre0512 Andre0512 merged commit 3d3efbc into Andre0512:main Aug 14, 2024
1 check passed
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