2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-24 09:09:19 +00:00

71_ONKYO_AVR_ZONE.pm: use IOhash for input validation

git-svn-id: https://svn.fhem.de/fhem/trunk@12261 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2016-10-03 14:12:20 +00:00
parent e233856a86
commit 33bf150c95

View File

@ -335,7 +335,8 @@ sub ONKYO_AVR_ZONE_Parse($$) {
# all other commands
else {
readingsBulkUpdate( $hash, $cmd, $value )
if ( ReadingsVal( $name, $cmd, "-" ) ne $value );
if ( ReadingsVal( $name, $cmd, "-" ) ne $value
|| $cmd =~ /^currentAlbumArt.*/ );
}
}
@ -1436,15 +1437,17 @@ sub ONKYO_AVR_ZONE_SendCommand($$$) {
$value =~ s/_/ /g;
if (
defined(
$hash->{helper}{receiver}{device}{selectorlist}{selector}
$IOhash->{helper}{receiver}{device}{selectorlist}{selector}
)
&& ref( $hash->{helper}{receiver}{device}{selectorlist}{selector} )
&& ref(
$IOhash->{helper}{receiver}{device}{selectorlist}{selector} )
eq "ARRAY"
)
{
foreach my $input (
@{ $hash->{helper}{receiver}{device}{selectorlist}{selector} } )
@{ $IOhash->{helper}{receiver}{device}{selectorlist}{selector} }
)
{
if ( $input->{value} eq "1"
&& $input->{zone} ne "00"