3e01ce2a6ce1b12432b8e81004981a9373856f42,homeassistant/components/media_player/cast.py,CastDevice,media_play,#CastDevice#,139
Before Change
def media_play(self):
Service to send the chromecast the command for play/pause.
ramp = self.cast.get_protocol(pychromecast.PROTOCOL_RAMP)
if ramp and ramp.state == pychromecast.RAMP_STATE_STOPPED:
ramp.playpause()
def media_pause(self):
Service to send the chromecast the command for play/pause.
ramp = self.cast.get_protocol(pychromecast.PROTOCOL_RAMP)
After Change
def media_play(self):
Service to send the chromecast the command for play/pause.
if self.state_attributes[ATTR_MEDIA_STATE] == MEDIA_STATE_STOPPED:
self.media_play_pause()
def media_pause(self):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances Project Name: home-assistant/home-assistant
Commit Name: 3e01ce2a6ce1b12432b8e81004981a9373856f42
Time: 2015-05-29
Author: hansmbakker@gmail.com
File Name: homeassistant/components/media_player/cast.py
Class Name: CastDevice
Method Name: media_play
Project Name: home-assistant/home-assistant
Commit Name: 3e01ce2a6ce1b12432b8e81004981a9373856f42
Time: 2015-05-29
Author: hansmbakker@gmail.com
File Name: homeassistant/components/media_player/cast.py
Class Name: CastDevice
Method Name: state_attributes
Project Name: home-assistant/home-assistant
Commit Name: 3e01ce2a6ce1b12432b8e81004981a9373856f42
Time: 2015-05-29
Author: hansmbakker@gmail.com
File Name: homeassistant/components/media_player/cast.py
Class Name: CastDevice
Method Name: media_pause