mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
98_WeekdayTimer: fix problem if use more then one holiday2we entry
git-svn-id: https://svn.fhem.de/fhem/trunk@19025 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
65105fe5ff
commit
9ea6f69e40
@ -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.
|
||||
- bugfix: 98_WeekdayTimer: fix problem if use more then one holiday2we entry
|
||||
- bugfix: 42_AptToDate: fix Can't call method readFromChild
|
||||
on an undefined value
|
||||
- feature: 93_Log2Syslog: new attribute "exclErrCond" to exclude events from
|
||||
|
@ -305,15 +305,17 @@ sub WeekdayTimer_getListeDerTage($$) {
|
||||
my $echteZeit = WeekdayTimer_zeitErmitteln ($now, $stunde, $minute, $sekunde, $relativeDay);
|
||||
#Log 3, "echteZeit---$i---->>>$relativeDay<<<----->".FmtDateTime($echteZeit);
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($echteZeit);
|
||||
my $h2we = $attr{global}{holiday2we};
|
||||
if($h2we) {
|
||||
my $ergebnis = fhem("get $h2we ".sprintf("%02d-%02d",$mon+1,$mday),1);
|
||||
if ($ergebnis ne "none") {
|
||||
#Log 3, "ergebnis-------$i----->$ergebnis";
|
||||
$hdays{$i} = undef if ($d==7); # $we Tag aufnehmen
|
||||
delete $hdays{$i} if ($d==8); # !$we Tag herausnehmen
|
||||
|
||||
foreach my $h2we (split(',', AttrVal('global', 'holiday2we', ''))) {
|
||||
if($h2we) {
|
||||
my $ergebnis = CommandGet(undef,$h2we . ' ' . sprintf("%02d-%02d",$mon+1,$mday));
|
||||
if ($ergebnis ne 'none') {
|
||||
#Log 3, "ergebnis-------$i----->$ergebnis";
|
||||
$hdays{$i} = undef if ($d==7); # $we Tag aufnehmen
|
||||
delete $hdays{$i} if ($d==8); # !$we Tag herausnehmen
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Log 3, "result------------>" . join (" ", sort keys %hdays);
|
||||
|
Loading…
Reference in New Issue
Block a user