2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

minor correction in Calendar examples

git-svn-id: https://svn.fhem.de/fhem/trunk@1820 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
borisneubert 2012-08-30 17:21:23 +00:00
parent a9bcf6397f
commit 470d33e545

View File

@ -1550,12 +1550,12 @@ A line ending with \ will be concatenated with the next one, so long lines
Think about a calendar with calendar events whose summaries (subjects, titles) are the names of devices in your fhem installation.
You want the respective devices to switch on when the calendar event starts and to switch off when the calendar event ends.<br><br>
<code>
define SwitchActorOn notify MyCalendar:modeStarted.* { my $uid= "%EVTPART1";; my $actor= fhem("get C summary $uid");; fhem("set $actor on") }<br><br>
define SwitchActorOff notify MyCalendar:modeEnded.* { my $uid= "%EVTPART1";; my $actor= fhem("get C summary $uid");; fhem("set $actor off") }
define SwitchActorOn notify MyCalendar:modeStarted.* { my $uid= "%EVTPART1";; my $actor= fhem("get MyCalendar summary $uid");; fhem("set $actor on") }<br><br>
define SwitchActorOff notify MyCalendar:modeEnded.* { my $uid= "%EVTPART1";; my $actor= fhem("get MyCalendar summary $uid");; fhem("set $actor off") }
</code><br><br>
You can also do some logging:<br><br>
<code>
define LogActors notify MyCalendar:mode(Started|Ended).* { my $reading= "%EVTPART0";; my $uid= "%EVTPART1";; my $actor= fhem("get C summary $uid");; Log 1, "Actor: $actor, Reading $reading" }
define LogActors notify MyCalendar:mode(Started|Ended).* { my $reading= "%EVTPART0";; my $uid= "%EVTPART1";; my $actor= fhem("get MyCalendar summary $uid");; Log 1, "Actor: $actor, Reading $reading" }
</code><br><br>
</ul>