Skip to content

Commit

Permalink
fix: add additional catches for login errors
Browse files Browse the repository at this point in the history
Closes #461
  • Loading branch information
alandtse committed Dec 20, 2019
1 parent a8bdbf4 commit 89a057b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/alexa_media/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ def state(self):
return STATE_IDLE
return STATE_STANDBY

@_catch_login_errors
async def async_update(self):
"""Get the latest details on a media player.
Expand Down
1 change: 1 addition & 0 deletions custom_components/alexa_media/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ def should_poll(self):
return not (self.hass.data[DATA_ALEXAMEDIA]
['accounts'][self._account]['websocket'])

@_catch_login_errors
async def async_update(self):
"""Update state."""
try:
Expand Down

0 comments on commit 89a057b

Please sign in to comment.