From b7235cba9da71947b966e14ac33f0020fa09e0f2 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Mon, 11 May 2020 19:32:12 +0000 Subject: [PATCH] fhem.pl: allow addStructChange without device (Forum #111052) git-svn-id: https://svn.fhem.de/fhem/trunk@21916 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index aa501bdc8..a9a7524de 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -5557,14 +5557,13 @@ setKeyValue($$) sub addStructChange($$$) { - return if(!$init_done); - my ($cmd, $dev, $param) = @_; - return if(!$defs{$dev} || $defs{$dev}{TEMPORARY}); + + return if(!$init_done); + return if(defined($dev) && + (!$defs{$dev} || $defs{$dev}{TEMPORARY} || $defs{$dev}{VOLATILE})); $lastDefChange++; - return if($defs{$dev}{VOLATILE}); - shift @structChangeHist if(@structChangeHist > AttrVal('global', 'maxChangeLog', 10) - 1); $param = substr($param, 0, 40)."..." if(length($param) > 40);