OWLCD: fix 'Warning, no 1-Wire I/O device found for ...'

git-svn-id: https://svn.fhem.de/fhem/trunk@5300 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
ntruchsess
2014-03-22 18:45:36 +00:00
parent 5abb9f95ac
commit 5a03463ff4

View File

@@ -172,12 +172,9 @@ sub OWLCD_Define ($$) {
#-- Couple to I/O device
AssignIoPort($hash);
if( (!defined($hash->{IODev}->{NAME})) || (!defined($hash->{IODev})) || (!defined($hash->{IODev}->{PRESENT})) ){
if( !defined($hash->{IODev}->{NAME}) | !defined($hash->{IODev}) ) {
return "OWSWITCH: Warning, no 1-Wire I/O device found for $name.";
}
if( $hash->{IODev}->{PRESENT} != 1 ){
return "OWSWITCH: Warning, 1-Wire I/O device ".$hash->{IODev}->{NAME}." not present for $name.";
}
$modules{OWLCD}{defptr}{$id} = $hash;
$hash->{STATE} = "Defined";