mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-28 02:44:53 +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:
parent
9353c0161b
commit
e3ddbfdd82
@ -1552,8 +1552,9 @@ The following local attributes are used by a wider range of devices:
|
|||||||
<ul>
|
<ul>
|
||||||
attr global holiday2we he
|
attr global holiday2we he
|
||||||
</ul>
|
</ul>
|
||||||
Note: if one of the elements in the list is called weekEnd, then the
|
Note: if one of the elements in the list is named weekEnd, then the
|
||||||
check for saturday/sunday is skipped.
|
check for saturday/sunday is skipped If the name is noWeekEnd, and
|
||||||
|
its Value is not none, than $we is 0.
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<a name="httpcompress"></a>
|
<a name="httpcompress"></a>
|
||||||
|
@ -1654,7 +1654,9 @@ Die folgenden lokalen Attribute werden von mehreren Geräten verwendet:
|
|||||||
attr global holiday2we hessen
|
attr global holiday2we hessen
|
||||||
</ul>
|
</ul>
|
||||||
Falls sich einer der Elemente dieser Liste weekEnd nennt, dann wird
|
Falls sich einer der Elemente dieser Liste weekEnd nennt, dann wird
|
||||||
nicht auf Samstag/Sonntag geprüft.
|
nicht auf Samstag/Sonntag geprüft. Falls einer der Elemente
|
||||||
|
noWeekEnd ist, und nicht "none" zurückliefert, dann ist
|
||||||
|
$we 0.<br>
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<a name="httpcompress"></a>
|
<a name="httpcompress"></a>
|
||||||
|
@ -5965,7 +5965,10 @@ IsWe(;$$)
|
|||||||
my ($we, $wf);
|
my ($we, $wf);
|
||||||
foreach my $h2we (split(",", AttrVal("global", "holiday2we", ""))) {
|
foreach my $h2we (split(",", AttrVal("global", "holiday2we", ""))) {
|
||||||
my $b = ReadingsVal($h2we, $when, 0);
|
my $b = ReadingsVal($h2we, $when, 0);
|
||||||
|
if($b && $b ne "none") {
|
||||||
|
return 0 if($h2we eq "noWeekEnd");
|
||||||
$we = 1 if($b && $b ne "none");
|
$we = 1 if($b && $b ne "none");
|
||||||
|
}
|
||||||
$wf = 1 if($h2we eq "weekEnd");
|
$wf = 1 if($h2we eq "weekEnd");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user