Skip to content

Fix to handle Abode server issues#73

Merged
MisterWil merged 2 commits intoMisterWil:masterfrom
shred86:callback-fix
Jul 26, 2020
Merged

Fix to handle Abode server issues#73
MisterWil merged 2 commits intoMisterWil:masterfrom
shred86:callback-fix

Conversation

@shred86
Copy link
Contributor

@shred86 shred86 commented Jul 25, 2020

An issue was identified with the Abode component in Home Assistant where entities are sometimes stuck in an "Unavailable" state after the web socket is disconnected. What appears to be occurring is sometimes the web socket reconnects, _on_socket_connected is called which then calls self._abode.refresh(). However, the issue is this refresh will sometimes throw an exception because the response is not correct (Abode server is probably still initializing) which then stops the callbacks from executing. For the Home Assistant Abode component, we still want these callbacks to execute since the web socket is connected.

Solution is to execute a try block here and execute the callbacks in the finally section such that they always execute since self._connected is in fact True.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 83.727% when pulling 7af0df2 on shred86:callback-fix into eb9fbbb on MisterWil:master.

@coveralls
Copy link

coveralls commented Jul 25, 2020

Coverage Status

Coverage decreased (-0.2%) to 83.727% when pulling 4926b9b on shred86:callback-fix into eb9fbbb on MisterWil:master.

@MisterWil MisterWil merged commit 61b9565 into MisterWil:master Jul 26, 2020
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.

3 participants