";
if ($small) { # nur ein Datumfeld umbrechbar
$out .= " ".(($de)?'Start' :'Begin')." | " if($seen{Begin});
$out .= " ".(($de)?'Ende' :'End')." | " if($seen{End});
} else {
$out .= " ".(($de)?'Start' :'Begin')." | " if($seen{Begin});
$out .= " ".(($de)?'----' :'----')." | " if($seen{Begin});
$out .= " ".(($de)?'Ende' :'End')." | " if($seen{End});
$out .= " ".(($de)?'----' :'----')." | " if($seen{End});
}
$out .= " ".(($de)?'Resttage' :'Days left')." | " if($seen{Days});
$out .= " ".(($de)?'Zeitzone' :'Timezone')." | " if($seen{Timezone});
$out .= " ".(($de)?'Zusammenfassung' :'Summary')." | " if($seen{Summary});
$out .= " ".(($de)?'Beschreibung' :'Description')." | " if($seen{Description});
$out .= " ".(($de)?'Status' :'State')." | " if($seen{Status});
$out .= " ".(($de)?'Erfüllung (%)' :'Completion (%)')." | " if($seen{Completion});
$out .= " ".(($de)?'Ort' :'Location')." | " if($seen{Location});
$out .= " ".(($de)?'Karte' :'Map')." | " if($seen{Map});
$out .= " ".(($de)?'Kalender' :'Calendar')." | " if($seen{Calendar});
$out .= " ".(($de)?'ID' :'ID')." | " if($seen{EventId});
my $l = length(keys %{$data{SSCal}{$name}{eventlist}});
my $maxbnr;
foreach my $key (keys %{$defs{$name}{READINGS}}) {
next if $key !~ /^(\d+)_\d+_EventId$/;
$maxbnr = $1 if(!$maxbnr || $1>$maxbnr);
}
return "" if(!defined $maxbnr);
my $k;
for ($k=0;$k<=$maxbnr;$k++) {
my $prestr = sprintf("%0$l.0f", $k); # Prestring erstellen
last if(!ReadingsVal($name, $prestr."_98_EventId", "")); # keine Ausgabe wenn es keine EventId mit Blocknummer 0 gibt -> kein Event/Aufgabe vorhanden
($begind,$begint,$endd,$endt,$gps) = ("","","","","");
$summary = ReadingsVal($name, $prestr."_01_Summary", "");
$desc = ReadingsVal($name, $prestr."_03_Description", "");
$begin = ReadingsVal($name, $prestr."_05_Begin", "");
$end = ReadingsVal($name, $prestr."_10_End", "");
$tz = ReadingsVal($name, $prestr."_15_Timezone", "");
$status = ReadingsVal($name, $prestr."_17_Status", "");
$dleft = ReadingsVal($name, $prestr."_20_daysLeft", "");
$location = ReadingsVal($name, $prestr."_35_Location", "");
$gpsa = ReadingsVal($name, $prestr."_40_gpsAddress", "");
$gpsc = ReadingsVal($name, $prestr."_45_gpsCoordinates", "");
$completion = ReadingsVal($name, $prestr."_85_percentComplete", "");
$cal = ReadingsVal($name, $prestr."_90_calName", "");
$id = ReadingsVal($name, $prestr."_98_EventId", "");
if($gpsc) {
my $micon;
if ($mi eq "icon") {
my $di = "it_i-net";
my $ui = $hash->{HELPER}{tableSpecs}{columnMapIcon};
$di = $ui ? $ui : $di;
$micon = FW_makeImage($di);
} elsif ($mi eq "data") {
$micon = join(" ", split(",", $gpsc));
} elsif ($mi eq "text") {
my $dt = "link";
my $ut = $hash->{HELPER}{tableSpecs}{columnMapText};
$micon = $ut ? $ut : $dt;
} else {
$micon = "";
}
my ($lat,$lng) = split(",", $gpsc);
$lat = (split("=", $lat))[1];
$lng = (split("=", $lng))[1];
my $up = $hash->{HELPER}{tableSpecs}{columnMapProvider} || "";
if ($up eq "GoogleMaps") { # Kartenprovider: Google Maps
$gps = " $micon ";
} elsif ($up eq "OpenStreetMap") {
$gps = " $micon "; # Kartenprovider: OpenstreetMap
} else {
$gps = " $micon "; # Kartenprovider default: Google Maps
}
}
if($begin ne "") { # Datum sprachabhängig konvertieren bzw. heute/morgen setzen
my ($ny,$nm,$nd,undef) = split(/[ -]/, TimeNow()); # Jetzt
my ($by,$bm,$bd,$bt) = split(/[ -]/, $begin);
my ($ey,$em,$ed,$et) = split(/[ -]/, $end);
my $ntimes = fhemTimeLocal(00, 00, 00, $nd, $nm-1, $ny-1900);
my $btimes = fhemTimeLocal(00, 00, 00, $bd, $bm-1, $by-1900);
my $etimes = fhemTimeLocal(00, 00, 00, $ed, $em-1, $ey-1900);
if($de) {
$begind = "$bd.$bm.$by";
$endd = "$ed.$em.$ey";
} else {
$begind = "$by-$bm-$bd";
$endd = "$ey-$em-$ed";
}
$begint = $bt;
$endt = $et;
$edleft = "";
if($etimes >= $ntimes) {
$edleft = int(($etimes - $ntimes)/86400);
}
$begind = (($de)?'heute ':'today ') if($dleft eq "0");
$endd = (($de)?'heute ':'today ') if($edleft eq "0");
$begind = (($de)?'morgen ':'tomorrow ') if($dleft eq "1");
$endd = (($de)?'morgen ':'tomorrow ') if($edleft eq "1");
$endd = "" if($begind eq $endd); # bei Ende nur Uhrzeit angeben wenn Termin am gleichen Tag beginnt/endet
}
$out .= "