mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
Calendar now creates extra events for every changed calendar events (changed: UID mode)
git-svn-id: https://svn.fhem.de/fhem/trunk@1826 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9ad884b8d4
commit
01d0dc97ca
@ -640,6 +640,7 @@ sub Calendar_CheckTimes($) {
|
|||||||
|
|
||||||
my @changedevents= grep { $_->modeChanged() } @allevents;
|
my @changedevents= grep { $_->modeChanged() } @allevents;
|
||||||
|
|
||||||
|
|
||||||
my @upcoming= sort map { $_->uid() } @upcomingevents;
|
my @upcoming= sort map { $_->uid() } @upcomingevents;
|
||||||
my @alarm= sort map { $_->uid() } @alarmedevents;
|
my @alarm= sort map { $_->uid() } @alarmedevents;
|
||||||
my @alarmed= sort map { $_->uid() } grep { $_->modeChanged() } @alarmedevents;
|
my @alarmed= sort map { $_->uid() } grep { $_->modeChanged() } @alarmedevents;
|
||||||
@ -649,7 +650,9 @@ sub Calendar_CheckTimes($) {
|
|||||||
my @ended= sort map { $_->uid() } grep { $_->modeChanged() } @endedevents;
|
my @ended= sort map { $_->uid() } grep { $_->modeChanged() } @endedevents;
|
||||||
my @changed= sort map { $_->uid() } @changedevents;
|
my @changed= sort map { $_->uid() } @changedevents;
|
||||||
|
|
||||||
readingsBeginUpdate($hash);
|
readingsBeginUpdate($hash); # clears all events in CHANGED, thus must be called first
|
||||||
|
# we create one fhem event for one changed calendar event
|
||||||
|
map { addEvent($hash, "changed: " . $_->uid() . " " . $_->mode() ); } @changedevents;
|
||||||
readingsUpdate($hash, "lastCheck", $hash->{fhem}{lastCheck});
|
readingsUpdate($hash, "lastCheck", $hash->{fhem}{lastCheck});
|
||||||
readingsUpdate($hash, "modeUpcoming", join(";", @upcoming));
|
readingsUpdate($hash, "modeUpcoming", join(";", @upcoming));
|
||||||
readingsUpdate($hash, "modeAlarm", join(";", @alarm));
|
readingsUpdate($hash, "modeAlarm", join(";", @alarm));
|
||||||
|
@ -1508,6 +1508,11 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
|
When a calendar event has changed, an event is created in the form
|
||||||
|
<code>changed: UID mode</code> with mode being the current mode the calendar event is in after the change.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
|
||||||
<b>Usage scenarios</b>
|
<b>Usage scenarios</b>
|
||||||
<ul>
|
<ul>
|
||||||
<i>Show all calendar events with details</i><br><br>
|
<i>Show all calendar events with details</i><br><br>
|
||||||
|
Loading…
Reference in New Issue
Block a user