2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

fhem.pl: IODev fix (no attr case), (Forum #120603)

git-svn-id: https://svn.fhem.de/fhem/trunk@24501 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2021-05-24 13:38:33 +00:00
parent f9afda7984
commit 628031d52f

View File

@ -2226,8 +2226,9 @@ fhem_setIoDev($$)
return "unknown IODev $val specified"; return "unknown IODev $val specified";
} }
my $av = AttrVal($hash->{NAME}, "IODev", "");
return "$hash->{NAME}: not setting IODev to $val, as different attr exists" return "$hash->{NAME}: not setting IODev to $val, as different attr exists"
if(AttrVal($hash->{NAME}, "IODev", "") ne $val); if($av && $av ne $val);
$hash->{IODev} = $defs{$val}; $hash->{IODev} = $defs{$val};
setReadingsVal($hash, "IODev", $val, TimeNow()); # 120603 setReadingsVal($hash, "IODev", $val, TimeNow()); # 120603