diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py
index 93571ba7d39..b69400142e0 100644
--- a/homeassistant/components/frontend/version.py
+++ b/homeassistant/components/frontend/version.py
@@ -1,2 +1,2 @@
""" DO NOT MODIFY. Auto-generated by build_frontend script """
-VERSION = "d9e860658bd8d9767b748b1b193776e6"
+VERSION = "6fb0e76d325bb7472fa25355e60539cd"
diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html
index d18421cfc90..1a23b706988 100644
--- a/homeassistant/components/frontend/www_static/frontend.html
+++ b/homeassistant/components/frontend/www_static/frontend.html
@@ -22208,13 +22208,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
-
-
[[stateObj.attributes.media_title]]
-
[[stateObj.stateDisplay]]
-
-
-
[[stateObj.stateDisplay]]
-
+
[[computePrimaryText(stateObj)]]
+
[[computeSecondaryText(stateObj)]]
@@ -22230,6 +22225,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
type: Object,
},
},
+
+ computePrimaryText: function(stateObj) {
+ return stateObj.attributes.media_title || stateObj.stateDisplay;
+ },
+
+ computeSecondaryText: function(stateObj) {
+ return stateObj.attributes.media_title ? stateObj.stateDisplay : '';
+ },
});
})();
@@ -25726,9 +25729,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
diff --git a/homeassistant/components/media_player/__init__.py b/homeassistant/components/media_player/__init__.py
index 537a5f16f39..0ce00eae43f 100644
--- a/homeassistant/components/media_player/__init__.py
+++ b/homeassistant/components/media_player/__init__.py
@@ -130,6 +130,7 @@ SERVICE_TO_METHOD = {
SERVICE_MEDIA_PLAY: 'media_play',
SERVICE_MEDIA_PAUSE: 'media_pause',
SERVICE_MEDIA_NEXT_TRACK: 'media_next_track',
+ SERVICE_MEDIA_PREV_TRACK: 'media_prev_track',
}
@@ -211,6 +212,10 @@ class MediaPlayerDevice(Entity):
""" media_pause media player. """
pass
+ def media_prev_track(self):
+ """ media_prev_track media player. """
+ pass
+
def media_next_track(self):
""" media_next_track media player. """
pass
diff --git a/homeassistant/components/media_player/cast.py b/homeassistant/components/media_player/cast.py
index f18c1db0760..9a9244a6939 100644
--- a/homeassistant/components/media_player/cast.py
+++ b/homeassistant/components/media_player/cast.py
@@ -24,6 +24,8 @@ from homeassistant.components.media_player import (
MEDIA_STATE_PLAYING, MEDIA_STATE_PAUSED, MEDIA_STATE_STOPPED,
MEDIA_STATE_UNKNOWN)
+CAST_SPLASH = 'https://home-assistant.io/images/cast/splash.png'
+
# pylint: disable=unused-argument
def setup_platform(hass, config, add_devices, discovery_info=None):
@@ -130,6 +132,13 @@ class CastDevice(MediaPlayerDevice):
return state_attr
+ 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:
+ self.cast.play_media(
+ CAST_SPLASH, pychromecast.STREAM_TYPE_BUFFERED)
+
def turn_off(self):
""" Service to exit any running app on the specimedia player ChromeCast and
shows idle screen. Will quit all ChromeCasts if nothing specified.
@@ -163,6 +172,14 @@ class CastDevice(MediaPlayerDevice):
if self.media_state == MEDIA_STATE_PLAYING:
self.cast.media_controller.pause()
+ def media_prev_track(self):
+ """ media_prev_track media player. """
+ self.cast.media_controller.rewind()
+
+ def media_next_track(self):
+ """ media_next_track media player. """
+ self.cast.media_controller.skip()
+
def play_youtube_video(self, video_id):
""" Plays specified video_id on the Chromecast's YouTube channel. """
self.youtube.play_video(video_id)
@@ -170,7 +187,6 @@ class CastDevice(MediaPlayerDevice):
def new_cast_status(self, status):
""" Called when a new cast status is received. """
self.cast_status = status
- self.media_status = None
self.update_ha_state()
def new_media_status(self, status):
diff --git a/requirements.txt b/requirements.txt
index 5dc0e7cc18b..624cd3797cd 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -18,7 +18,7 @@ phue>=0.8
ledcontroller>=1.0.7
# media_player.cast
-pychromecast>=0.6.0.3
+pychromecast>=0.6.2
# keyboard
pyuserinput>=0.1.9