Skip to content

Commit

Permalink
Fix cast doing I/O in event loop (#12632)
Browse files Browse the repository at this point in the history
  • Loading branch information
OttoWinter authored and balloob committed Feb 25, 2018
1 parent 781b768 commit 8d0d676
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion homeassistant/components/media_player/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def async_cast_discovered(chromecast):
else:
# Manually add a "normal" Chromecast, we can do that without discovery.
try:
chromecast = pychromecast.Chromecast(*want_host)
chromecast = yield from hass.async_add_job(
pychromecast.Chromecast, *want_host)
except pychromecast.ChromecastConnectionError:
_LOGGER.warning("Can't set up chromecast on %s", want_host[0])
raise
Expand Down

0 comments on commit 8d0d676

Please sign in to comment.