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

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@5300 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
ntruchsess
2014-03-22 18:45:36 +00:00
parent 238ed726b1
commit 464b4183ca

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";