2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-10 01:55:38 +00:00

amended docs

git-svn-id: https://svn.fhem.de/fhem/trunk@2287 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
borisneubert 2012-12-09 14:51:28 +00:00
parent 8d70304f15
commit cd42da2e71

View File

@ -1142,9 +1142,23 @@ sub Calendar_Undef($$) {
<ul>
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 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>
define SwitchActorOn notify MyCalendar:modeStarted.* {
my $reading="%EVTPART0";;
my $uid= "%EVTPART1";;
my $actor= fhem("get MyCalendar summary $uid");;
if(defined $actor) {
fhem("set $actor on")
}
}<br><br>
define SwitchActorOff notify MyCalendar:modeEnded.* {
my $reading="%EVTPART0";;
my $uid= "%EVTPART1";;
my $actor= fhem("get MyCalendar summary $uid");;
if(defined $actor) {
fhem("set $actor off")
}
}
</code><br><br>
You can also do some logging:<br><br>
<code>