2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-09 20:57:11 +00:00

YAMAHA_AVR: fix max volume when using float values in set command "volume" (Forum: #78756)

git-svn-id: https://svn.fhem.de/fhem/trunk@15362 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2017-10-31 11:22:36 +00:00
parent 9d3ba02b5c
commit 6cbce7fd7e
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- bugfix: 71_YAMAHA_AVR: fix max volume when using float values in
set command "volume"
- bugfix: 93_DbRep: V5.8.6, don't limit length of attr reading/device if
attr contains a list
- feature: 70_KODI: added reading jsonResponse which contains the last

View File

@ -457,9 +457,9 @@ YAMAHA_AVR_Set($@)
{
my $target_volume;
if($what eq "volume" and defined($a[2]) and $a[2] =~ /^\d{1,3}$/ and $a[2] >= 0 && $a[2] <= 100)
if($what eq "volume" and defined($a[2]) and $a[2] =~ /^\d{1,3}(?:\.\d)?$/ and $a[2] >= 0 && $a[2] <= 100)
{
$target_volume = YAMAHA_AVR_volume_rel2abs($a[2]);
$target_volume = YAMAHA_AVR_volume_rel2abs(int($a[2]));
}
elsif($what eq "volumeDown" and defined(ReadingsVal($name, "volume", undef)))
{