Skip to content

Commit

Permalink
fix(notify): add key check for targets
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Sep 2, 2019
1 parent f455772 commit fac356d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/alexa_media/notify.py
Expand Up @@ -98,6 +98,8 @@ def targets(self):
devices = {}
for account, account_dict in (self.hass.data[DATA_ALEXAMEDIA]
['accounts'].items()):
if ('devices' not in account_dict):
return devices
for serial, alexa in (account_dict
['devices']['media_player'].items()):
devices[alexa['accountName']] = serial
Expand Down

0 comments on commit fac356d

Please sign in to comment.