2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

98_alarmclock: New feature stop Alarm

git-svn-id: https://svn.fhem.de/fhem/trunk@14444 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
FlorianZ 2017-06-01 18:27:28 +00:00
parent 719195fb33
commit 15cdbb0776
2 changed files with 16 additions and 0 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- feature: 98_alarmclock: New feature stop Alarm
- bugfix: 98_DOIFtools: fixed empty N_timer
- bugfix: 37_Spotify: fixed offset playContextByURI
- bugfix: 38_CO20: fixed reconnects, improved stability

View File

@ -53,6 +53,7 @@ my %alarmclock_sets =
"AlarmOff" => "NONE",
"AlarmTime_Weekdays" => "09:00",
"AlarmTime_Weekend" => "09:00",
"stop" => "NONE",
"skip" => "NONE",
"save" => "NONE",
"load" => "NONE",
@ -219,6 +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"
." AlarmTime_Weekdays"
." AlarmTime_Weekend"
." stop:Alarm"
." skip:NextAlarm,None"
." save:Weekprofile_1,Weekprofile_2,Weekprofile_3,Weekprofile_4,Weekprofile_5"
." load:Weekprofile_1,Weekprofile_2,Weekprofile_3,Weekprofile_4,Weekprofile_5"
@ -333,6 +335,16 @@ sub alarmclock_Set($$)
}
}
### stop Alarm ###
if ($opt eq "stop")
{
if (($value eq "Alarm") && ((ReadingsVal($hash->{NAME},"state",0)) =~ /^(Alarm is running|Snooze for.*)/))
{
alarmclock_alarmroutine_stop($hash);
}
}
### save Weekprofile ###
if ($opt eq "save")
@ -1304,6 +1316,9 @@ sub alarmclock_Notify($$)
</li>
<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.
</li>
<li><b>stop</b> (Alarm)<br>
Stops a running alarm.
</li>
<li><b>save</b> (Weekprofile_1|Weekprofile_2|Weekprofile_3|Weekprofile_4|Weekprofile_5)<br>
Save alarm times in a profile.