mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
98_alarmclock.pm: fix Prealarm
git-svn-id: https://svn.fhem.de/fhem/trunk@16981 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6de9209b41
commit
6a491dedcb
@ -350,7 +350,7 @@ sub alarmclock_Set($$)
|
||||
|
||||
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|PreAlarm is running|Snooze for.*)/))
|
||||
{
|
||||
alarmclock_alarmroutine_stop($hash);
|
||||
}
|
||||
@ -744,9 +744,8 @@ sub alarmclock_alarmroutine_stop($)
|
||||
fhem("".AttrVal($hash->{NAME},"AlarmRoutineOff",""));
|
||||
readingsSingleUpdate( $hash,"state", "Alarm stopped", 1 );
|
||||
Log3 $hash->{NAME}, 3, "alarmclock: $hash->{NAME} - alarmroutine stopped.";
|
||||
RemoveInternalTimer($hash, "alarmclock_hardalarmroutine_start");
|
||||
RemoveInternalTimer($hash, "alarmclock_alarmroutine_stop");
|
||||
alarmclock_createtimer($hash);
|
||||
RemoveInternalTimer($hash);
|
||||
alarmclock_midnight_timer($hash);
|
||||
|
||||
}
|
||||
|
||||
@ -1335,7 +1334,7 @@ sub alarmclock_Notify($$)
|
||||
|
||||
### Notify Alarm off ###
|
||||
|
||||
if((ReadingsVal($hash->{NAME},"state",0)) =~ /^(Alarm is running|Snooze for.*)/)
|
||||
if((ReadingsVal($hash->{NAME},"state",0)) =~ /^(Alarm is running|PreAlarm is running|Snooze for.*)/)
|
||||
{
|
||||
if(my @AlarmOffDevice = split(/\|/, AttrVal($hash->{NAME},"EventForAlarmOff","")))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user