mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Remove unused Sonos turn on/off methods (#24174)
This commit is contained in:
parent
fd3902f7e7
commit
bebfc3d16e
@ -19,7 +19,7 @@ from homeassistant.components.media_player.const import (
|
|||||||
SUPPORT_PREVIOUS_TRACK, SUPPORT_SEEK, SUPPORT_SELECT_SOURCE,
|
SUPPORT_PREVIOUS_TRACK, SUPPORT_SEEK, SUPPORT_SELECT_SOURCE,
|
||||||
SUPPORT_SHUFFLE_SET, SUPPORT_STOP, SUPPORT_VOLUME_MUTE, SUPPORT_VOLUME_SET)
|
SUPPORT_SHUFFLE_SET, SUPPORT_STOP, SUPPORT_VOLUME_MUTE, SUPPORT_VOLUME_SET)
|
||||||
from homeassistant.const import (
|
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.helpers.dispatcher import async_dispatcher_connect
|
||||||
from homeassistant.util.dt import utcnow
|
from homeassistant.util.dt import utcnow
|
||||||
|
|
||||||
@ -307,8 +307,6 @@ class SonosEntity(MediaPlayerDevice):
|
|||||||
return STATE_PAUSED
|
return STATE_PAUSED
|
||||||
if self._status in ('PLAYING', 'TRANSITIONING'):
|
if self._status in ('PLAYING', 'TRANSITIONING'):
|
||||||
return STATE_PLAYING
|
return STATE_PLAYING
|
||||||
if self._status == 'OFF':
|
|
||||||
return STATE_OFF
|
|
||||||
return STATE_IDLE
|
return STATE_IDLE
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -403,7 +401,7 @@ class SonosEntity(MediaPlayerDevice):
|
|||||||
|
|
||||||
self._player_volume = None
|
self._player_volume = None
|
||||||
self._player_muted = None
|
self._player_muted = None
|
||||||
self._status = 'OFF'
|
self._status = 'IDLE'
|
||||||
self._coordinator = None
|
self._coordinator = None
|
||||||
self._media_duration = None
|
self._media_duration = None
|
||||||
self._media_position = None
|
self._media_position = None
|
||||||
@ -802,16 +800,6 @@ class SonosEntity(MediaPlayerDevice):
|
|||||||
|
|
||||||
return sources
|
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_error(UPNP_ERRORS_TO_IGNORE)
|
||||||
@soco_coordinator
|
@soco_coordinator
|
||||||
def media_play(self):
|
def media_play(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user