57_CALVIEW.pm: -fixed reading problem

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@13214 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
chris1284 2017-01-23 18:24:09 +00:00
parent 049876834e
commit dc400d3557

View File

@ -158,7 +158,7 @@ sub CALVIEW_GetUpdate($){
readingsBulkUpdate($hash, "t_".sprintf ('%03d', $counter)."_mode", $termin->{mode});
#wenn termin heute today readings anlegen
if ($date eq $termin->{bdate} ){
if($isbday == 1 ){ readingsBulkUpdate($hash, "today_".sprintf ('%03d', $counter)."_age", $age);}
if($isbday == 1 ){ readingsBulkUpdate($hash, "today_".sprintf ('%03d', $todaycounter)."_age", $age);}
readingsBulkUpdate($hash, "today_".sprintf ('%03d', $todaycounter)."_bdate", "heute");
readingsBulkUpdate($hash, "today_".sprintf ('%03d', $todaycounter)."_btime", $termin->{btime});
if(AttrVal($name,"datestyle","_description") eq "ISO8601"){readingsBulkUpdate($hash, "today_".sprintf ('%03d', $todaycounter)."_bdatetimeiso", $termin->{bdatetimeiso});readingsBulkUpdate($hash, "today_".sprintf ('%03d', $todaycounter)."_edatetimiso", $termin->{edatetimeiso});}
@ -173,7 +173,7 @@ sub CALVIEW_GetUpdate($){
}
#wenn termin morgen tomorrow readings anlegen
elsif ($datenext eq $termin->{bdate}){
if($isbday == 1 ){readingsBulkUpdate($hash, "tomorrow_".sprintf ('%03d', $counter)."_age", $age);}
if($isbday == 1 ){readingsBulkUpdate($hash, "tomorrow_".sprintf ('%03d', $tomorrowcounter)."_age", $age);}
readingsBulkUpdate($hash, "tomorrow_".sprintf ('%03d', $tomorrowcounter)."_bdate", "morgen");
readingsBulkUpdate($hash, "tomorrow_".sprintf ('%03d', $tomorrowcounter)."_btime", $termin->{btime});
if(AttrVal($name,"datestyle","_description") eq "ISO8601"){readingsBulkUpdate($hash, "tomorrow_".sprintf ('%03d', $tomorrowcounter)."_bdatetimeiso", $termin->{bdatetimeiso});readingsBulkUpdate($hash, "tomorrow_".sprintf ('%03d', $tomorrowcounter)."_edatetimeiso", $termin->{edatetimeiso});}