From 0583d63b67061f17e2f2455b778652e8cf4d97e5 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 31 May 2015 01:29:28 -0700 Subject: [PATCH] Fix Cast platform detecting it was on while it was not --- homeassistant/components/media_player/cast.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/media_player/cast.py b/homeassistant/components/media_player/cast.py index 9a9244a6939..33ac14efa1e 100644 --- a/homeassistant/components/media_player/cast.py +++ b/homeassistant/components/media_player/cast.py @@ -135,7 +135,10 @@ class CastDevice(MediaPlayerDevice): def turn_on(self): """ Turns on the ChromeCast. """ # The only way we can turn the Chromecast is on is by launching an app - if not self.cast.status.is_active_input: + if not self.cast.status or not self.cast.status.is_active_input: + if self.cast.app_id: + self.cast.quit_app() + self.cast.play_media( CAST_SPLASH, pychromecast.STREAM_TYPE_BUFFERED)