2
0
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:
LeonGaultier 2019-03-25 09:12:13 +00:00
parent 65105fe5ff
commit 9ea6f69e40
2 changed files with 11 additions and 8 deletions

View File

@ -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

View File

@ -305,16 +305,18 @@ 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};
foreach my $h2we (split(',', AttrVal('global', 'holiday2we', ''))) {
if($h2we) {
my $ergebnis = fhem("get $h2we ".sprintf("%02d-%02d",$mon+1,$mday),1);
if ($ergebnis ne "none") {
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);
return keys %hdays;