37_Spotify: smooth volumeUp

git-svn-id: https://svn.fhem.de/fhem/trunk@14432 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
neumann
2017-05-30 20:20:16 +00:00
parent 2985f4421c
commit c6d82010b5

View File

@@ -636,6 +636,7 @@ sub Spotify_volumeStep($$$$) {
$step = 5 if(!defined $step); $step = 5 if(!defined $step);
my $nextVolume = min(100, max(0, $hash->{helper}{device_active}{volume_percent} + $step * $direction)); my $nextVolume = min(100, max(0, $hash->{helper}{device_active}{volume_percent} + $step * $direction));
$hash->{helper}{device_active}{volume_percent} = $nextVolume;
Spotify_setVolume($hash, 0, $nextVolume, $device_id); Spotify_setVolume($hash, 0, $nextVolume, $device_id);
return undef; return undef;