98_WeekdayTimer.pm: enable multiple holiday2we-devices for also non-holiday TYPE devices

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@19043 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2019-03-26 18:08:05 +00:00
parent fb1d0f6cdf
commit 89e6e8a6b9

View File

@ -307,14 +307,21 @@ sub WeekdayTimer_getListeDerTage($$) {
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($echteZeit); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($echteZeit);
foreach my $h2we (split(',', AttrVal('global', 'holiday2we', ''))) { foreach my $h2we (split(',', AttrVal('global', 'holiday2we', ''))) {
if($h2we) { if($h2we) {
my $ergebnis = CommandGet(undef,$h2we . ' ' . sprintf("%02d-%02d",$mon+1,$mday)); my $ergebnis = 'none';
if ($ergebnis ne 'none') { if (InternalVal($h2we, 'TYPE', '') eq "holiday") {
#Log 3, "ergebnis-------$i----->$ergebnis"; $ergebnis = CommandGet(undef,$h2we . ' ' . sprintf("%02d-%02d",$mon+1,$mday));
$hdays{$i} = undef if ($d==7); # $we Tag aufnehmen } elsif ($wday==$nowWday ){
delete $hdays{$i} if ($d==8); # !$we Tag herausnehmen $ergebnis = "is_true" if IsWe();
} }elsif ( $wday==$nowWday+1){
$ergebnis = "is_true" if IsWe("tomorrow");
} }
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
}
}
} }
} }