From fafc0157b47980347092127496f46f8752d67ef9 Mon Sep 17 00:00:00 2001 From: chris1284 Date: Tue, 3 Oct 2017 18:20:21 +0000 Subject: [PATCH] 57_CALVIEW.pm: -fixed fullday bug git-svn-id: https://svn.fhem.de/fhem/trunk@15191 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/57_CALVIEW.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/57_CALVIEW.pm b/fhem/FHEM/57_CALVIEW.pm index 3e4e5bc49..9d519a647 100644 --- a/fhem/FHEM/57_CALVIEW.pm +++ b/fhem/FHEM/57_CALVIEW.pm @@ -200,6 +200,7 @@ sub CALVIEW_GetUpdate($){ my($startday,$startmonth,$startyear)=split(/\./,$termin->{bdate}); my($endday,$endmonth,$endyear)=split(/\./,$termin->{edate}); 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}.""; if( $endday eq $nextday && $termin->{btime} eq $termin->{etime} ){ $timeshort = AttrVal($name,"fulldaytext","ganztägig"); } else { @@ -265,7 +266,9 @@ sub CALVIEW_GetUpdate($){ readingsBulkUpdate($hash, "tomorrow_".sprintf ('%03d', $tomorrowcounter)."_mode", $termin->{mode}); readingsBulkUpdate($hash, "tomorrow_".sprintf ('%03d', $tomorrowcounter)."_timeshort", $timeshort ); $tomorrowcounter++; - } + } + $endday = ''; + $nextday =''; last if ($counter++ == $max); }