mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 13:24:56 +00:00
95_Alarm.pm: Bugfix zero delay
git-svn-id: https://svn.fhem.de/fhem/trunk@12649 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
94f4f6d03c
commit
5d298ca8a5
@ -40,7 +40,7 @@ my $alarmname = "Alarms"; # link text
|
||||
my $alarmhiddenroom = "AlarmRoom"; # hidden room
|
||||
my $alarmpublicroom = "Alarm"; # public room
|
||||
my $alarmno = 8;
|
||||
my $alarmversion = "2.8";
|
||||
my $alarmversion = "2.81";
|
||||
|
||||
#########################################################################################
|
||||
#
|
||||
@ -441,6 +441,17 @@ sub Alarm_Arm($$$$$){
|
||||
my $cmdact = AttrVal($name, "armact", 0);
|
||||
if( ($xdl eq '')|($xdl eq '0:00')|($xdl eq '00:00') ){
|
||||
CommandAttr(undef,$name.' level'.$level.'xec armed');
|
||||
readingsSingleUpdate( $hash, "level".$level,"armed",0 );
|
||||
#--transform commands from fhem to perl level
|
||||
my @cmdactarr = split(/;/,$cmdact);
|
||||
my $cmdactf;
|
||||
if( int(@cmdactarr) == 1 ){
|
||||
fhem("$cmdact");
|
||||
}else{
|
||||
for(my $i=0;$i<int(@cmdactarr);$i++){
|
||||
fhem("$cmdactarr[$i]");
|
||||
}
|
||||
}
|
||||
$msg = "[Alarm $level] armed from alarmSensor $dev with event $evt";
|
||||
Log3 $hash,3,$msg;
|
||||
} elsif( $xdl =~ /([0-9])?:([0-5][0-9])?/ ){
|
||||
|
Loading…
x
Reference in New Issue
Block a user