2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

YAMAHA_AVR: fixing not working volumeStraight set command (Forum: #46344)

git-svn-id: https://svn.fhem.de/fhem/trunk@10292 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2015-12-29 13:05:12 +00:00
parent 10fac8ab5c
commit 13d201e505
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
# 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: fixing not working volumeStraight set command
- change: FB_CALLLIST: start call processing only when "event:" is triggered
by corresponding FB_CALLMONITOR device.
- change: FB_CALLMONITOR: default value for attr fritzbox-remote-phonebook-via

View File

@ -425,7 +425,7 @@ YAMAHA_AVR_Set($@)
{
my $target_volume;
if($what eq "volume" and defined($a[2]) and $a[2] >= 0 && $a[2] <= 100)
if($what eq "volume" and defined($a[2]) and $a[2] =~ /^\d{1,3}$/ and $a[2] >= 0 && $a[2] <= 100)
{
$target_volume = YAMAHA_AVR_volume_rel2abs($a[2]);
}
@ -437,7 +437,7 @@ YAMAHA_AVR_Set($@)
{
$target_volume = YAMAHA_AVR_volume_rel2abs($hash->{READINGS}{volume}{VAL} + ((defined($a[2]) and $a[2] =~ /^\d+$/) ? $a[2] : AttrVal($hash->{NAME}, "volumeSteps",5)));
}
elsif(defined($a[2]) and $a[2] =~ /^\d+(?:\.\d)?$/)
elsif(defined($a[2]) and $a[2] =~ /^-?\d+(?:\.\d)?$/)
{
$target_volume = $a[2];
}