98_alarmclock: New feature stop Alarm

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@14445 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
FlorianZ 2017-06-01 18:29:36 +00:00
parent 061388775a
commit af49ac9313

View File

@ -53,7 +53,7 @@ my %alarmclock_sets =
"AlarmOff" => "NONE", "AlarmOff" => "NONE",
"AlarmTime_Weekdays" => "09:00", "AlarmTime_Weekdays" => "09:00",
"AlarmTime_Weekend" => "09:00", "AlarmTime_Weekend" => "09:00",
"stop" => "NONE", "stop" => "NONE",
"skip" => "NONE", "skip" => "NONE",
"save" => "NONE", "save" => "NONE",
"load" => "NONE", "load" => "NONE",
@ -220,7 +220,7 @@ sub alarmclock_Set($$)
." AlarmOff:1_Monday,2_Tuesday,3_Wednesday,4_Thursday,5_Friday,6_Saturday,7_Sunday,8_Holiday,9_Vacation,Weekdays,Weekend,All" ." AlarmOff:1_Monday,2_Tuesday,3_Wednesday,4_Thursday,5_Friday,6_Saturday,7_Sunday,8_Holiday,9_Vacation,Weekdays,Weekend,All"
." AlarmTime_Weekdays" ." AlarmTime_Weekdays"
." AlarmTime_Weekend" ." AlarmTime_Weekend"
." stop:Alarm" ." stop:Alarm"
." skip:NextAlarm,None" ." skip:NextAlarm,None"
." save:Weekprofile_1,Weekprofile_2,Weekprofile_3,Weekprofile_4,Weekprofile_5" ." save:Weekprofile_1,Weekprofile_2,Weekprofile_3,Weekprofile_4,Weekprofile_5"
." load:Weekprofile_1,Weekprofile_2,Weekprofile_3,Weekprofile_4,Weekprofile_5" ." load:Weekprofile_1,Weekprofile_2,Weekprofile_3,Weekprofile_4,Weekprofile_5"
@ -334,15 +334,15 @@ sub alarmclock_Set($$)
return "Please Set $opt HH:MM" ; return "Please Set $opt HH:MM" ;
} }
} }
### stop Alarm ### ### stop Alarm ###
if ($opt eq "stop") if ($opt eq "stop")
{ {
if (($value eq "Alarm") && ((ReadingsVal($hash->{NAME},"state",0)) =~ /^(Alarm is running|Snooze for.*)/)) if (($value eq "Alarm") && ((ReadingsVal($hash->{NAME},"state",0)) =~ /^(Alarm is running|Snooze for.*)/))
{ {
alarmclock_alarmroutine_stop($hash); alarmclock_alarmroutine_stop($hash);
} }
} }
### save Weekprofile ### ### save Weekprofile ###
@ -1317,7 +1317,7 @@ sub alarmclock_Notify($$)
<li><b>AlarmOff</b> (1_Monday|2_Tuesday|3_Wednesday|4_Thursday|5_Friday|6_Saturday|7_Sunday|8_Holiday|9_Vacation|Weekdays|Weekend|All)<br> <li><b>AlarmOff</b> (1_Monday|2_Tuesday|3_Wednesday|4_Thursday|5_Friday|6_Saturday|7_Sunday|8_Holiday|9_Vacation|Weekdays|Weekend|All)<br>
Sets the alarm time of the respective day to off. Sets the alarm time of the respective day to off.
</li> </li>
<li><b>stop</b> (Alarm)<br> <li><b>stop</b> (Alarm)<br>
Stops a running alarm. Stops a running alarm.
</li> </li>
<li><b>save</b> (Weekprofile_1|Weekprofile_2|Weekprofile_3|Weekprofile_4|Weekprofile_5)<br> <li><b>save</b> (Weekprofile_1|Weekprofile_2|Weekprofile_3|Weekprofile_4|Weekprofile_5)<br>