mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
98_DOIF.pm: fixed attribute weekdays
git-svn-id: https://svn.fhem.de/fhem/trunk@18023 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
09b0b28e3f
commit
a51ad0d419
@ -1568,12 +1568,10 @@ ParseCommandsDoIf($$$)
|
|||||||
sub DOIF_weekdays($$)
|
sub DOIF_weekdays($$)
|
||||||
{
|
{
|
||||||
my ($hash,$weekdays)=@_;
|
my ($hash,$weekdays)=@_;
|
||||||
my @days=split(',',AttrVal($hash->{NAME},"weekdays","So,Mo,Di,Mi,Do,Fr,Sa,WE,AT,MWE"));
|
my @days=split(',',AttrVal($hash->{NAME},"weekdays","So|Su,Mo,Di|Tu,Mi|We,Do|Th,Fr,Sa,WE,AT|WD,MWE|TWE"));
|
||||||
my @edays=split(',',"Su,Mo,Tu,We,Th,Fr,Sa,WE,WD,TWE");
|
for (my $i=@days-1;$i>=0;$i--)
|
||||||
for (my $i=0;$i<@days;$i++)
|
|
||||||
{
|
{
|
||||||
$weekdays =~ s/$days[$i]/$i/;
|
$weekdays =~ s/$days[$i]/$i/;
|
||||||
$weekdays =~ s/$edays[$i]/$i/;
|
|
||||||
}
|
}
|
||||||
return($weekdays);
|
return($weekdays);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user