diff --git a/fhem/CHANGED b/fhem/CHANGED index e74cf0015..15a85b5ba 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,8 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - change: 57_Calendar: new attribute quirks with ignoreDtStamp value. + - change: 57_Calendar: cutoffOlderThan also removes recurring events when + the series has ended. - change: 55_DWD_OpenData: KML based forecast, readings have changed, attr forecastProperties must be updated (forum #83097) - bugfix: 12_HProtocolGateway: Filllevel conversion corrected diff --git a/fhem/FHEM/57_Calendar.pm b/fhem/FHEM/57_Calendar.pm index 9d78e2d9d..ed06a6113 100644 --- a/fhem/FHEM/57_Calendar.pm +++ b/fhem/FHEM/57_Calendar.pm @@ -1685,7 +1685,7 @@ sub Calendar_Initialize($) { $hash->{NotifyFn}= "Calendar_Notify"; $hash->{AttrList}= "update:sync,async,none removevcalendar:0,1 " . "cutoffOlderThan hideOlderThan hideLaterThan onCreateEvent " . - "ignoreCancelled:0,1 " . + "ignoreCancelled:0,1 quirks " . "SSLVerify:0,1 defaultFormat defaultTimeFormat " . $readingFnAttributes; } @@ -2719,11 +2719,15 @@ sub Calendar_UpdateCalendar($$) { my ($hash, $ical)= @_; + my $name= $hash->{NAME}; + + my @quirks= split(",", AttrVal($name, "quirks", "")); + my $nodtstamp= "ignoreDTSTAMP" ~~ @quirks; + # ******************************* # *** Step 1 Digest Parser Result # ******************************* - my $name= $hash->{NAME}; my $error= $ical->{error}; my $state= $ical->{state}; @@ -2811,6 +2815,7 @@ sub Calendar_UpdateCalendar($$) { $cutoff= $t- $cutoffT; } + foreach my $v (grep { $_->{type} eq "VEVENT" } @{$root->{entries}}) { # totally skip outdated calendar entries @@ -2857,7 +2862,7 @@ sub Calendar_UpdateCalendar($$) { # and same SEQUENCE # if($v0->sameValue($v, "LAST-MODIFIED") && - $v0->sameValue($v, "DTSTAMP")) { + ($nodtstamp || $v0->sameValue($v, "DTSTAMP"))) { # # is not modified # @@ -3531,6 +3536,15 @@ sub CalendarEventsAsHtml($;$) { although they are cancelled.

+

  • quirks <values>
    + Parameters to handle special situations. <values> is + a comma-separated list of the following keywords: + +
  • +

  • readingFnAttributes
  • @@ -3993,6 +4007,17 @@ sub CalendarEventsAsHtml($;$) { Serie zurückgegeben werden, die gelöscht sind.

    +

  • quirks <values>
    + Parameter für spezielle Situationen. <values> ist + eine mit Kommas getrennte Liste der folgenden Schlüsselwörter: + +
  • + +

  • readingFnAttributes