2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-21 07:56:03 +00:00

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 c4f5d40c6d
commit fd121d19d1

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