mirror of
https://github.com/home-assistant/core.git
synced 2025-05-05 14:39:16 +00:00
Fix Cast platform detecting it was on while it was not
This commit is contained in:
parent
afd99a0c6c
commit
0583d63b67
@ -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…
x
Reference in New Issue
Block a user