Skip to content

Commit

Permalink
Fix sonos sleep timer (#7503)
Browse files Browse the repository at this point in the history
  • Loading branch information
frog32 authored and pvizeli committed May 9, 2017
1 parent b34c583 commit d86dfb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/media_player/sonos.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ def service_handle(service):
elif service.service == SERVICE_RESTORE:
device.restore(service.data[ATTR_WITH_GROUP])
elif service.service == SERVICE_SET_TIMER:
device.set_timer(service.data[ATTR_SLEEP_TIME])
device.set_sleep_timer(service.data[ATTR_SLEEP_TIME])
elif service.service == SERVICE_CLEAR_TIMER:
device.clear_timer()
device.clear_sleep_timer()

device.schedule_update_ha_state(True)

Expand Down
4 changes: 0 additions & 4 deletions tests/components/media_player/test_sonos.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ def __init__(self, ip):
self.is_visible = True
self.avTransport = AvTransportMock()

def clear_sleep_timer(self):
"""Clear the sleep timer."""
return

def get_sonos_favorites(self):
"""Get favorites list from sonos."""
return {'favorites': []}
Expand Down

1 comment on commit d86dfb6

@ragrvs
Copy link

@ragrvs ragrvs commented on d86dfb6 May 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thanks Marc and pvizeli!

Please sign in to comment.