You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If notify runs before media_player is initialized, it reports a key error.
To Reproduce
Steps to reproduce the behavior:
Restart with notify loading first:
2019-09-02 08:58:31 INFO (MainThread) [custom_components.alexa_media] Loaded alexapy==1.0.1,
2019-09-02 08:58:34 INFO (MainThread) [homeassistant.setup] Setting up alexa,
2019-09-02 08:58:34 INFO (MainThread) [homeassistant.setup] Setup of domain alexa took 0.0 seconds.,
2019-09-02 08:58:41 WARNING (MainThread) [homeassistant.setup] Setup of alexa_media is taking over 10 seconds.,
2019-09-02 08:58:43 INFO (MainThread) [homeassistant.setup] Setup of domain alexa_media took 12.0 seconds.,
2019-09-02 08:58:43 INFO (MainThread) [homeassistant.components.notify] Setting up notify.alexa_media,
File "/config/custom_components/alexa_media/notify.py", line 102, in targets,
2019-09-02 08:59:29 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.alexa_media,
2019-09-02 08:59:29 INFO (MainThread) [homeassistant.components.notify] Setting up notify.alexa_media,
2019-09-02 08:59:29 INFO (MainThread) [homeassistant.components.alarm_control_panel] Setting up alarm_control_panel.alexa_media,
2019-09-02 08:59:29 INFO (MainThread) [homeassistant.components.switch] Setting up switch.alexa_media
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/notify/__init__.py", line 122, in async_setup_platform
if hasattr(notify_service, "targets"):
File "/config/custom_components/alexa_media/notify.py", line 102, in targets
['devices']['media_player'].items()):
KeyError: 'devices'
Expected behavior
No key error.
Screenshots
If applicable, add screenshots to help explain your problem.
System details
Home-assistant (version):
Hassio (Yes/No): (Please note you may have to restart hassio 2-3 times to load the latest version of alexapy after an update. This looks like a HA bug).
alexa_media (version from const.py or HA startup):
alexapy (version from pip show alexapy or HA startup):
Describe the bug
If notify runs before media_player is initialized, it reports a key error.
To Reproduce
Steps to reproduce the behavior:
Restart with notify loading first:
Expected behavior
No key error.
Screenshots
If applicable, add screenshots to help explain your problem.
System details
const.py
or HA startup):pip show alexapy
or HA startup):Additional context
https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639/3139
The text was updated successfully, but these errors were encountered: