2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

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
This commit is contained in:
Ellert 2018-07-09 16:56:54 +00:00
parent ee917a35f4
commit 04179e2d3a
2 changed files with 3 additions and 2 deletions

View File

@ -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,

View File

@ -896,7 +896,7 @@ sub DOIFtoolsCheckDOIF {
$ret .= "<li><b>sleep</b> im DOIF zu nutzen, wird nicht empfohlen, nutze das Attribut <b>wait</b> für (<a target=\"_blank\" href=\"https://fhem.de/commandref_DE.html#DOIF_wait\">Verzögerungen</a>)</li>\n" if ($tail =~ m/(sleep\s\d+\.?\d+\s*[;|,]?)/);
$ret .= "<li>ersetze <b>[</b>name<b>:?</b>regex<b>]</b> durch <b>[</b>name<b>:\"</b>regex<b>\"]</b> (<a target=\"_blank\" href=\"https://fhem.de/commandref_DE.html#DOIF_Ereignissteuerung_ueber_Auswertung_von_Events\">Vermeidung veralteter Syntax</a>)</li>\n" if ($tail =~ m/(\[.*?[^"]?:[^"]?\?.*?\])/);
$ret .= "<li>der erste <b>Befehl</b> nach <b>DOELSE</b> scheint eine <b>Bedingung</b> zu sein, weil <b>$2</b> enthalten ist, bitte prüfen.</li>\n" if ($tail =~ m/(DOELSE .*?\]\s*?(\!\S|\=\~|\!\~|and|or|xor|not|\|\||\&\&|\=\=|\!\=|ne|eq|lt|gt|le|ge)\s*?).*?\)/);
$ret .= "<li>nach <b>DOELSE</b> ist möglicherweise eine <b>Bedingung</b> angegeben, weil <b>$2</b> gefunden wurde, bitte prüfen (ignorieren, wenn der Operator zu einem Befehl gehört).</li>\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 .= "<li><b>sleep</b> is not recommended in DOIF, use attribute <b>wait</b> for (<a target=\"_blank\" href=\"https://fhem.de/commandref_DE.html#DOIF_wait\">delay</a>)</li>\n" if ($tail =~ m/(sleep\s\d+\.?\d+\s*[;|,]?)/);
$ret .= "<li>replace <b>[</b>name<b>:?</b>regex<b>]</b> by <b>[</b>name<b>:\"</b>regex<b>\"]</b> (<a target=\"_blank\" href=\"https://fhem.de/commandref_DE.html#DOIF_Ereignissteuerung_ueber_Auswertung_von_Events\">avoid old syntax</a>)</li>\n" if ($tail =~ m/(\[.*?[^"]?:[^"]?\?.*?\])/);
$ret .= "<li>the first <b>command</b> after <b>DOELSE</b> seems to be a <b>condition</b> indicated by <b>$2</b>, check it.</li>\n" if ($tail =~ m/(DOELSE .*?\]\s*?(\!\S|\=\~|\!\~|and|or|xor|not|\|\||\&\&|\=\=|\!\=|ne|eq|lt|gt|le|ge)\s*?).*?\)/);
$ret .= "<li><b>$2</b> found after <b>DOELSE</b>, it seems to be a <b>condition</b>, check it (ignore if it's part of a command).</li>\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 = ();