mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +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($$)
|
||||
{
|
||||
my ($hash,$weekdays)=@_;
|
||||
my @days=split(',',AttrVal($hash->{NAME},"weekdays","So,Mo,Di,Mi,Do,Fr,Sa,WE,AT,MWE"));
|
||||
my @edays=split(',',"Su,Mo,Tu,We,Th,Fr,Sa,WE,WD,TWE");
|
||||
for (my $i=0;$i<@days;$i++)
|
||||
my @days=split(',',AttrVal($hash->{NAME},"weekdays","So|Su,Mo,Di|Tu,Mi|We,Do|Th,Fr,Sa,WE,AT|WD,MWE|TWE"));
|
||||
for (my $i=@days-1;$i>=0;$i--)
|
||||
{
|
||||
$weekdays =~ s/$days[$i]/$i/;
|
||||
$weekdays =~ s/$edays[$i]/$i/;
|
||||
}
|
||||
return($weekdays);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user