mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +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:
parent
10fac8ab5c
commit
13d201e505
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# 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
|
- change: FB_CALLLIST: start call processing only when "event:" is triggered
|
||||||
by corresponding FB_CALLMONITOR device.
|
by corresponding FB_CALLMONITOR device.
|
||||||
- change: FB_CALLMONITOR: default value for attr fritzbox-remote-phonebook-via
|
- change: FB_CALLMONITOR: default value for attr fritzbox-remote-phonebook-via
|
||||||
|
@ -425,7 +425,7 @@ YAMAHA_AVR_Set($@)
|
|||||||
{
|
{
|
||||||
my $target_volume;
|
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]);
|
$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)));
|
$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];
|
$target_volume = $a[2];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user