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

YAMAHA_AVR: minor code optimizations

git-svn-id: https://svn.fhem.de/fhem/trunk@6915 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2014-11-08 11:14:55 +00:00
parent 0e60544672
commit 084d321bd6

View File

@ -288,7 +288,7 @@ YAMAHA_AVR_Set($@)
}
}
}
elsif($what =~ /(volumeStraight|volume|volumeUp|volumeDown)/)
elsif($what =~ /^(volumeStraight|volume|volumeUp|volumeDown)$/)
{
my $target_volume;
@ -514,7 +514,7 @@ YAMAHA_AVR_Set($@)
elsif($what eq "remoteControl")
{
# the RX-Vx75 series use a different tag name to access the remoteControl commands
my $control_tag = ($hash->{MODEL} =~ /RX-V\d75/ ? "Cursor_Control" : "List_Control");
my $control_tag = (exists($hash->{MODEL}) and $hash->{MODEL} =~ /RX-V\d75/ ? "Cursor_Control" : "List_Control");
if($a[2] eq "up")
{
@ -644,7 +644,7 @@ YAMAHA_AVR_Define($$)
# set the volume-smooth-change attribute only if it is not defined, so no user values will be overwritten
#
# own attribute values will be overwritten anyway when all attr-commands are executed from fhem.cfg
$attr{$name}{"volume-smooth-change"} = "1" unless(defined($attr{$name}{"volume-smooth-change"}));
$attr{$name}{"volume-smooth-change"} = "1" unless(exists($attr{$name}{"volume-smooth-change"}));
unless(exists($hash->{helper}{AVAILABLE}) and ($hash->{helper}{AVAILABLE} == 0))
{