Fix Cast platform detecting it was on while it was not
This commit is contained in:
parent
afd99a0c6c
commit
0583d63b67
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue