2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

57_CALVIEW.pm: -fixed fullday bug

git-svn-id: https://svn.fhem.de/fhem/trunk@15191 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
chris1284 2017-10-03 18:20:21 +00:00
parent 22933ae0fe
commit ddfbfe5034

View File

@ -200,6 +200,7 @@ sub CALVIEW_GetUpdate($){
my($startday,$startmonth,$startyear)=split(/\./,$termin->{bdate}); my($startday,$startmonth,$startyear)=split(/\./,$termin->{bdate});
my($endday,$endmonth,$endyear)=split(/\./,$termin->{edate}); my($endday,$endmonth,$endyear)=split(/\./,$termin->{edate});
my $nextday = $startday + 1; my $nextday = $startday + 1;
$nextday = sprintf ('%02d', $nextday);
Log3 $name , 5, "CALVIEW $name - nextday = $nextday , endday = $endday , startday = $startday , btime ".$termin->{btime}." , etime ".$termin->{etime}.""; Log3 $name , 5, "CALVIEW $name - nextday = $nextday , endday = $endday , startday = $startday , btime ".$termin->{btime}." , etime ".$termin->{etime}."";
if( $endday eq $nextday && $termin->{btime} eq $termin->{etime} ){ $timeshort = AttrVal($name,"fulldaytext","ganztägig"); } if( $endday eq $nextday && $termin->{btime} eq $termin->{etime} ){ $timeshort = AttrVal($name,"fulldaytext","ganztägig"); }
else { else {
@ -265,7 +266,9 @@ sub CALVIEW_GetUpdate($){
readingsBulkUpdate($hash, "tomorrow_".sprintf ('%03d', $tomorrowcounter)."_mode", $termin->{mode}); readingsBulkUpdate($hash, "tomorrow_".sprintf ('%03d', $tomorrowcounter)."_mode", $termin->{mode});
readingsBulkUpdate($hash, "tomorrow_".sprintf ('%03d', $tomorrowcounter)."_timeshort", $timeshort ); readingsBulkUpdate($hash, "tomorrow_".sprintf ('%03d', $tomorrowcounter)."_timeshort", $timeshort );
$tomorrowcounter++; $tomorrowcounter++;
} }
$endday = '';
$nextday ='';
last if ($counter++ == $max); last if ($counter++ == $max);
} }