From fee72afbecf075b559f924a7c992363fbd63facc Mon Sep 17 00:00:00 2001 From: damian-s <> Date: Tue, 19 Mar 2013 16:23:54 +0000 Subject: [PATCH] fixed SemicolonEscape git-svn-id: https://svn.fhem.de/fhem/trunk@2948 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_THRESHOLD.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fhem/FHEM/98_THRESHOLD.pm b/fhem/FHEM/98_THRESHOLD.pm index a72b712e9..e15be8b51 100644 --- a/fhem/FHEM/98_THRESHOLD.pm +++ b/fhem/FHEM/98_THRESHOLD.pm @@ -148,8 +148,8 @@ THRESHOLD_Define($$$) $cmd2 =~ s/@/$actor/g; } - $hash->{helper}{actor_cmd1} = $cmd1; - $hash->{helper}{actor_cmd2} = $cmd2; + $hash->{helper}{actor_cmd1} = SemicolonEscape($cmd1); + $hash->{helper}{actor_cmd2} = SemicolonEscape($cmd2); $hash->{helper}{actor_cmd_default} = $cmd_default; $hash->{STATE} = 'initialized' if (!ReadingsVal($pn,"desired_value","")); @@ -312,15 +312,15 @@ THRESHOLD_setValue($$) my $cmd_now = $cmd[$cmd_nr-1]; my $cmd_sym_now = $cmd_sym[$cmd_nr-1]; - if ($cmd_now) { if (ReadingsVal($pn,"cmd","") ne $cmd_sym_now) { - if ($ret = AnalyzeCommandChain(undef, $cmd_now)) { - Log GetLogLevel($pn,3), "output of $pn $cmd_now: $ret"; + if ($cmd_now eq "") { + readingsSingleUpdate ($hash, "cmd",$cmd_sym_now, 1); + } elsif ($ret = AnalyzeCommandChain(undef, $cmd_now)) { + Log GetLogLevel($pn,3), "output of $pn $cmd_now: $ret"; } else { readingsSingleUpdate ($hash, "cmd",$cmd_sym_now, 1); } } - } } 1; @@ -372,7 +372,7 @@ THRESHOLD_setValue($$) the second sensor
  • reading2
    - reading of the second sensor + reading of the second sensor
    default value: state
  • state
    @@ -530,7 +530,7 @@ THRESHOLD_setValue($$) ein definierter Sensor, dessen Status abgefragt wird
  • reading2
    - Reading, der den Status des Sensors beinhaltet + Reading, der den Status des Sensors beinhaltet
    Defaultwert: state
  • state