Increase sonos volume increment from 1 to 5

pull/1728/head
Alexander Fortin 2016-04-06 20:32:27 +02:00 committed by Paulus Schoutsen
parent cfb318287d
commit e8efcd21df
1 changed files with 3 additions and 2 deletions

View File

@ -94,6 +94,7 @@ class SonosDevice(MediaPlayerDevice):
def __init__(self, hass, player):
"""Initialize the Sonos device."""
self.hass = hass
self.volume_increment = 5
super(SonosDevice, self).__init__()
self._player = player
self.update()
@ -199,11 +200,11 @@ class SonosDevice(MediaPlayerDevice):
def volume_up(self):
"""Volume up media player."""
self._player.volume += 1
self._player.volume += self.volume_increment
def volume_down(self):
"""Volume down media player."""
self._player.volume -= 1
self._player.volume -= self.volume_increment
def set_volume_level(self, volume):
"""Set volume level, range 0..1."""