mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
98_WeekdayTimer.pm: enable multiple holiday2we-devices for also non-holiday TYPE devices
git-svn-id: https://svn.fhem.de/fhem/trunk@19043 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
dcaaabfef5
commit
3e3552d440
@ -307,14 +307,21 @@ sub WeekdayTimer_getListeDerTage($$) {
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($echteZeit);
|
||||
|
||||
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
|
||||
}
|
||||
if($h2we) {
|
||||
my $ergebnis = 'none';
|
||||
if (InternalVal($h2we, 'TYPE', '') eq "holiday") {
|
||||
$ergebnis = CommandGet(undef,$h2we . ' ' . sprintf("%02d-%02d",$mon+1,$mday));
|
||||
} elsif ($wday==$nowWday ){
|
||||
$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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user