Skip to content

Commit

Permalink
Remove unused Sonos turn on/off methods (#24174)
Browse files Browse the repository at this point in the history
  • Loading branch information
amelchio authored and balloob committed May 29, 2019
1 parent fd3902f commit bebfc3d
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions homeassistant/components/sonos/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
SUPPORT_PREVIOUS_TRACK, SUPPORT_SEEK, SUPPORT_SELECT_SOURCE,
SUPPORT_SHUFFLE_SET, SUPPORT_STOP, SUPPORT_VOLUME_MUTE, SUPPORT_VOLUME_SET)
from homeassistant.const import (
ENTITY_MATCH_ALL, STATE_IDLE, STATE_OFF, STATE_PAUSED, STATE_PLAYING)
ENTITY_MATCH_ALL, STATE_IDLE, STATE_PAUSED, STATE_PLAYING)
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.util.dt import utcnow

Expand Down Expand Up @@ -307,8 +307,6 @@ def state(self):
return STATE_PAUSED
if self._status in ('PLAYING', 'TRANSITIONING'):
return STATE_PLAYING
if self._status == 'OFF':
return STATE_OFF
return STATE_IDLE

@property
Expand Down Expand Up @@ -403,7 +401,7 @@ def update(self):

self._player_volume = None
self._player_muted = None
self._status = 'OFF'
self._status = 'IDLE'
self._coordinator = None
self._media_duration = None
self._media_position = None
Expand Down Expand Up @@ -802,16 +800,6 @@ def source_list(self):

return sources

@soco_error()
def turn_on(self):
"""Turn the media player on."""
self.media_play()

@soco_error()
def turn_off(self):
"""Turn off media player."""
self.media_stop()

@soco_error(UPNP_ERRORS_TO_IGNORE)
@soco_coordinator
def media_play(self):
Expand Down

0 comments on commit bebfc3d

Please sign in to comment.