diff --git a/fhem/contrib/DS_Starter/57_SSCal.pm b/fhem/contrib/DS_Starter/57_SSCal.pm index d02d0b0a5..6d8921836 100644 --- a/fhem/contrib/DS_Starter/57_SSCal.pm +++ b/fhem/contrib/DS_Starter/57_SSCal.pm @@ -159,7 +159,7 @@ sub SSCal_Initialize($) { $hash->{AttrList} = "asyncMode:1,0 ". "calOverviewInDetail:0,1 ". "calOverviewInRoom:0,1 ". - "calOverviewFields:multiple-strict,Begin,End,Summary,Status,Location,Description,GPS,Calendar,Completion,Timezone ". + "calOverviewFields:multiple-strict,Begin,End,Summary,Status,Location,Description,Map,Calendar,Completion,Timezone ". "cutOlderDays ". "cutLaterDays ". "disable:1,0 ". @@ -2224,15 +2224,16 @@ sub SSCal_writeValuesToArray ($$$$$$$$$$$) { $vh->{$p}{$r} = "" if(!defined $vh->{$p}{$r}); next if($vh->{$p}{$r} eq ""); if ($r eq "address") { - $address = encode("UTF-8", $vh->{$p}{$r}); + $address = encode("UTF-8", $vh->{$p}{$r}) if($vh->{$p}{$r}); } if ($r eq "gps") { $lng = encode("UTF-8", $vh->{$p}{$r}{lng}); $lat = encode("UTF-8", $vh->{$p}{$r}{lat}); } } - $val = "mlat=".$lat.",mlon=".$lng; - push(@row_array, $bts+$n." 08_GPS " .$val."\n"); + push(@row_array, $bts+$n." 08_gpsAddress " .$address."\n"); + $val = "lat=".$lat.",lng=".$lng; + push(@row_array, $bts+$n." 08_gpsCoordinates " .$val."\n"); } push(@row_array, $bts+$n." 11_isAllday " .$val."\n") if($p eq "is_all_day"); @@ -3212,7 +3213,7 @@ sub SSCal_calAsHtml($) { $out .= " Status " if($seen{Status}); $out .= " Completion
(%) " if($seen{Completion}); $out .= " Location " if($seen{Location}); - $out .= " GPS " if($seen{GPS}); + $out .= " Map " if($seen{Map}); $out .= " Calendar " if($seen{Calendar}); $out .= " "; @@ -3236,7 +3237,7 @@ sub SSCal_calAsHtml($) { $end = ReadingsVal($name, $prestr."_03_End", "not set"); $desc = ReadingsVal($name, $prestr."_04_Description", ""); $location = ReadingsVal($name, $prestr."_07_Location", ""); - $gps = ReadingsVal($name, $prestr."_08_GPS", ""); + $gps = ReadingsVal($name, $prestr."_08_gpsCoordinates", ""); $tz = ReadingsVal($name, $prestr."_09_Timezone", ""); $status = ReadingsVal($name, $prestr."_10_Status", ""); $completion = ReadingsVal($name, $prestr."_16_percentComplete", ""); @@ -3245,9 +3246,9 @@ sub SSCal_calAsHtml($) { if($gps) { my $img = FW_makeImage("it_i-net"); my ($lat,$lng) = split(",", $gps); - $gps = " $img "; - #$gps = ""; - # $gps = $img; + $lat = (split("=", $lat))[1]; + $lng = (split("=", $lng))[1]; + $gps = " $img "; } $out .= ""; @@ -3259,7 +3260,7 @@ sub SSCal_calAsHtml($) { $out .= " $status " if($seen{Status}); $out .= " $completion " if($seen{Completion}); $out .= " $location " if($seen{Location}); - $out .= " $gps " if($seen{GPS}); + $out .= " $gps " if($seen{Map}); $out .= " $cal " if($seen{Calendar}); $out .= ""; }