98_serviced: v1.2.7 - get first status only if init_done

git-svn-id: https://svn.fhem.de/fhem/trunk@23881 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
DeeSPe
2021-03-02 18:29:52 +00:00
parent a99d3a3160
commit 37b54b3800

View File

@@ -16,7 +16,7 @@ use Blocking;
use Time::HiRes;
use vars qw{%defs};
my $servicedVersion = "1.2.6";
my $servicedVersion = "1.2.7";
sub serviced_shutdownwait($);
@@ -77,8 +77,11 @@ sub serviced_Define($$)
"StatusJammed=state,values=/error|failed/:JAMMED;/.*/:NOT_JAMMED";
}
}
readingsSingleUpdate($hash,"state","Initialized",1) if ($init_done);
serviced_GetUpdate($hash);
if ($init_done)
{
readingsSingleUpdate($hash,"state","Initialized",1) ;
serviced_GetUpdate($hash);
}
return undef;
}
@@ -273,7 +276,7 @@ sub serviced_ExecCmd($)
Log3 $name,5,"$name: serviced_ExecCmd com: $com, line: $line";
my @ret;
my $re = "";
foreach (@qx)
for (@qx)
{
chomp;
$_ =~ s/[\s\t ]{1,}/ /g;