From bebfc3d16ec248b65bd7b5cce7d99b7f937efb02 Mon Sep 17 00:00:00 2001 From: Anders Melchiorsen Date: Wed, 29 May 2019 20:12:44 +0200 Subject: [PATCH] Remove unused Sonos turn on/off methods (#24174) --- homeassistant/components/sonos/media_player.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/homeassistant/components/sonos/media_player.py b/homeassistant/components/sonos/media_player.py index 2a96308c58729..f165f34558686 100644 --- a/homeassistant/components/sonos/media_player.py +++ b/homeassistant/components/sonos/media_player.py @@ -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 @@ -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 @@ -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 @@ -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):