From 13d4ce67e0033e23b0e05cabf92e454fa396424c Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Fri, 29 Apr 2016 11:25:51 +0000 Subject: [PATCH] 90_at.pm: add execNow as set command (Forum #52716) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@11342 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/90_at.pm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/FHEM/90_at.pm b/FHEM/90_at.pm index 8c69735f6..fca3ead15 100755 --- a/FHEM/90_at.pm +++ b/FHEM/90_at.pm @@ -239,7 +239,7 @@ at_Set($@) { my ($hash, @a) = @_; - my %sets = (modifyTimeSpec=>1, inactive=>0, active=>0); + my %sets = (modifyTimeSpec=>1, inactive=>0, active=>0, execNow=>0); my $cmd = join(" ", sort keys %sets); $cmd =~ s/modifyTimeSpec/modifyTimeSpec:time/ if($at_detailFnCalled); $at_detailFnCalled = 0; @@ -267,6 +267,12 @@ at_Set($@) readingsSingleUpdate($hash,"state","Next: ".FmtTime($hash->{TRIGGERTIME}),1) if(!AttrVal($hash->{NAME}, "disable", undef)); return undef; + + } elsif($a[1] eq "execNow") { + my $name = $hash->{NAME}; + my $ret = AnalyzeCommandChain(undef, SemicolonEscape($hash->{COMMAND})); + Log3 $name, 3, "$name: $ret" if($ret); + } } @@ -488,6 +494,9 @@ EOF
  • active
    Activates the current device (see inactive).
  • +
  • execNow
    + Execute the command associated with the at. The execution of a relative + at is not affected by this command.

  • @@ -659,6 +668,10 @@ EOF
  • active
    Aktiviert das entsprechende Gerät, siehe inactive.
  • +
  • execNow
    + Führt das mit dem at spezifizierte Befehl aus. Beeinflußt + nicht die Ausführungszeiten relativer Spezifikationen. +