From 0c6ef3b7f922116351e99c773e085276ba171a61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Arnauts?= Date: Wed, 23 Nov 2016 07:16:01 +0100 Subject: [PATCH] Try to register a Chromecast anyway, even if it could not be detected by get_chromecasts(), since it might be on a other network. Fixes #4469. (#4470) --- homeassistant/components/media_player/cast.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/homeassistant/components/media_player/cast.py b/homeassistant/components/media_player/cast.py index 1ec61cc621a..1d01f0058ec 100644 --- a/homeassistant/components/media_player/cast.py +++ b/homeassistant/components/media_player/cast.py @@ -81,6 +81,13 @@ def setup_platform(hass, config, add_devices, discovery_info=None): KNOWN_HOSTS.append(host) except pychromecast.ChromecastConnectionError: pass + else: + try: + # add the device anyway, get_chromecasts couldn't find it + casts.append(CastDevice(pychromecast.Chromecast(*host))) + KNOWN_HOSTS.append(host) + except pychromecast.ChromecastConnectionError: + pass add_devices(casts)