2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

47_OBIS: more robustness for changing polltime/interval

git-svn-id: https://svn.fhem.de/fhem/trunk@24099 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
gvzdus 2021-03-27 19:52:47 +00:00
parent cc5a7ad25d
commit 78f085ba9f

View File

@ -774,7 +774,8 @@ sub OBIS_Attr(@)
return "OBIS ($name) - $name: attr pollingMode must be on or off"
if ($aName eq "pollingMode" && $aVal!~/^(on|off)$/);
my $dopoll = ($aName eq "interval" || AttrVal($name,"interval",0)>0) &&
(($aName eq "pollingMode" && $aVal eq "on") || AttrVal($name,"pollingMode","off") eq "on");
(($aName eq "pollingMode" && $aVal eq "on") ||
($aName ne "pollingMode" && AttrVal($name,"pollingMode","off") eq "on"));
Log3 $name, 3, "OBIS ($name) - Attr $aName Val $aVal, dopoll = $dopoll";
if ($dopoll) {
# DevIo_CloseDev($hash);