mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Fix cast doing I/O in event loop (#12632)
This commit is contained in:
parent
781b7687a4
commit
8d0d676ff2
@ -182,7 +182,8 @@ def async_setup_platform(hass: HomeAssistantType, config: ConfigType,
|
|||||||
else:
|
else:
|
||||||
# Manually add a "normal" Chromecast, we can do that without discovery.
|
# Manually add a "normal" Chromecast, we can do that without discovery.
|
||||||
try:
|
try:
|
||||||
chromecast = pychromecast.Chromecast(*want_host)
|
chromecast = yield from hass.async_add_job(
|
||||||
|
pychromecast.Chromecast, *want_host)
|
||||||
except pychromecast.ChromecastConnectionError:
|
except pychromecast.ChromecastConnectionError:
|
||||||
_LOGGER.warning("Can't set up chromecast on %s", want_host[0])
|
_LOGGER.warning("Can't set up chromecast on %s", want_host[0])
|
||||||
raise
|
raise
|
||||||
|
Loading…
x
Reference in New Issue
Block a user