2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-27 20:34:52 +00:00

fhem.pl: IsWe checks for noWeekEnd (Forum #101789)

git-svn-id: https://svn.fhem.de/fhem/trunk@19719 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-06-27 05:33:17 +00:00
parent 9353c0161b
commit e3ddbfdd82
3 changed files with 10 additions and 4 deletions

View File

@ -1552,8 +1552,9 @@ The following local attributes are used by a wider range of devices:
<ul>
attr global holiday2we he
</ul>
Note: if one of the elements in the list is called weekEnd, then the
check for saturday/sunday is skipped.
Note: if one of the elements in the list is named weekEnd, then the
check for saturday/sunday is skipped If the name is noWeekEnd, and
its Value is not none, than $we is 0.
</li><br>
<a name="httpcompress"></a>

View File

@ -1654,7 +1654,9 @@ Die folgenden lokalen Attribute werden von mehreren Ger&auml;ten verwendet:
attr global holiday2we hessen
</ul>
Falls sich einer der Elemente dieser Liste weekEnd nennt, dann wird
nicht auf Samstag/Sonntag gepr&uuml;ft.
nicht auf Samstag/Sonntag gepr&uuml;ft. Falls einer der Elemente
noWeekEnd ist, und nicht &quot;none&quot; zur&uuml;ckliefert, dann ist
$we 0.<br>
</li><br>
<a name="httpcompress"></a>

View File

@ -5965,7 +5965,10 @@ IsWe(;$$)
my ($we, $wf);
foreach my $h2we (split(",", AttrVal("global", "holiday2we", ""))) {
my $b = ReadingsVal($h2we, $when, 0);
$we = 1 if($b && $b ne "none");
if($b && $b ne "none") {
return 0 if($h2we eq "noWeekEnd");
$we = 1 if($b && $b ne "none");
}
$wf = 1 if($h2we eq "weekEnd");
}