mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +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
@ -639,6 +639,7 @@ sub Calendar_CheckTimes($) {
|
|||||||
foreach $event (@endedevents) { $event->setMode("end"); }
|
foreach $event (@endedevents) { $event->setMode("end"); }
|
||||||
|
|
||||||
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;
|
||||||
@ -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));
|
||||||
|
@ -1507,6 +1507,11 @@ A line ending with \ will be concatenated with the next one, so long lines
|
|||||||
</table>
|
</table>
|
||||||
</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>
|
||||||
|
Loading…
Reference in New Issue
Block a user