From 04179e2d3a55d736443ef17bfa71bb831ea26c75 Mon Sep 17 00:00:00 2001
From: Ellert <>
Date: Mon, 9 Jul 2018 16:56:54 +0000
Subject: [PATCH] 98_DOIFtools.pm: more precise hint related to DOELSE (Forum
#89260)
git-svn-id: https://svn.fhem.de/fhem/trunk@16968 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/CHANGED | 1 +
fhem/FHEM/98_DOIFtools.pm | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fhem/CHANGED b/fhem/CHANGED
index 1c34e8e24..35b150aca 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
+ - change: 98_DOIFtools: more precise hint related to DOELSE (Forum #89260)
- change: 98_feels_like.pm: Improved algorithms
- change: 98_dewpoint: new attributes absoluteHumidity, vapourPressure
attribute absFeuchte is now deprecated,
diff --git a/fhem/FHEM/98_DOIFtools.pm b/fhem/FHEM/98_DOIFtools.pm
index 85b259a2e..59463b3bb 100644
--- a/fhem/FHEM/98_DOIFtools.pm
+++ b/fhem/FHEM/98_DOIFtools.pm
@@ -896,7 +896,7 @@ sub DOIFtoolsCheckDOIF {
$ret .= "
sleep im DOIF zu nutzen, wird nicht empfohlen, nutze das Attribut wait für (Verzögerungen)\n" if ($tail =~ m/(sleep\s\d+\.?\d+\s*[;|,]?)/);
$ret .= "ersetze [name:?regex] durch [name:\"regex\"] (Vermeidung veralteter Syntax)\n" if ($tail =~ m/(\[.*?[^"]?:[^"]?\?.*?\])/);
- $ret .= "der erste Befehl nach DOELSE scheint eine Bedingung zu sein, weil $2 enthalten ist, bitte prüfen.\n" if ($tail =~ m/(DOELSE .*?\]\s*?(\!\S|\=\~|\!\~|and|or|xor|not|\|\||\&\&|\=\=|\!\=|ne|eq|lt|gt|le|ge)\s*?).*?\)/);
+ $ret .= "nach DOELSE ist möglicherweise eine Bedingung angegeben, weil $2 gefunden wurde, bitte prüfen (ignorieren, wenn der Operator zu einem Befehl gehört).\n" if ($tail =~ m/(DOELSE .*?\]\s*?(\!\S|\=\~|\!\~|and|or|xor|not|\|\||\&\&|\=\=|\!\=|ne|eq|lt|gt|le|ge)\s*?).*?\)/);
my @wait = SplitDoIf(":",AttrVal($tn,"wait",""));
my @sub0 = ();
my @tmp = ();
@@ -966,7 +966,7 @@ sub DOIFtoolsCheckDOIF {
$ret .= "sleep is not recommended in DOIF, use attribute wait for (delay)\n" if ($tail =~ m/(sleep\s\d+\.?\d+\s*[;|,]?)/);
$ret .= "replace [name:?regex] by [name:\"regex\"] (avoid old syntax)\n" if ($tail =~ m/(\[.*?[^"]?:[^"]?\?.*?\])/);
- $ret .= "the first command after DOELSE seems to be a condition indicated by $2, check it.\n" if ($tail =~ m/(DOELSE .*?\]\s*?(\!\S|\=\~|\!\~|and|or|xor|not|\|\||\&\&|\=\=|\!\=|ne|eq|lt|gt|le|ge)\s*?).*?\)/);
+ $ret .= "$2 found after DOELSE, it seems to be a condition, check it (ignore if it's part of a command).\n" if ($tail =~ m/(DOELSE .*?\]\s*?(\!\S|\=\~|\!\~|and|or|xor|not|\|\||\&\&|\=\=|\!\=|ne|eq|lt|gt|le|ge)\s*?).*?\)/);
my @wait = SplitDoIf(":",AttrVal($tn,"wait",""));
my @sub0 = ();
my @tmp = ();