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

95_Alarm.pm: Neue Version 4.05

git-svn-id: https://svn.fhem.de/fhem/trunk@16368 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
phenning 2018-03-10 07:01:51 +00:00
parent d788ec10ec
commit 470cae8ae9

View File

@ -43,7 +43,7 @@ my $alarmlinkname = "Alarms"; # link text
my $alarmhiddenroom = "AlarmRoom"; # hidden room
my $alarmpublicroom = "Alarm"; # public room
my $alarmno = 8;
my $alarmversion = "4.03";
my $alarmversion = "4.05";
my %alarm_transtable_EN = (
"ok" => "OK",
@ -270,7 +270,6 @@ sub Alarm_transform($){
if( $md==1 );
}
#########################################################################################
#
# Alarm_Undef - Implements Undef function
@ -510,11 +509,10 @@ sub Alarm_escape($$){
sub Alarm_save($) {
my ($hash) = @_;
my $date = localtime(time);
my $date = TimeNow();
$hash->{DATA}{"savedate"} = $date;
readingsSingleUpdate( $hash, "savedate", $hash->{DATA}{"savedate"}, 1 );
my $json = JSON->new->utf8;
my $jhash0 = eval{ $json->encode( $hash->{DATA} ) };
readingsSingleUpdate( $hash, "savedate", $date, 1 );
my $jhash0 = toJSON($hash->{DATA});
my $error = FileWrite("AlarmFILE",$jhash0);
#Log 1,"[Alarm_save] error=$error";
return;
@ -1271,6 +1269,8 @@ sub Alarm_Html($)
$al .= $i.",";
$at .= $s.",";
}
}else{
$detailstate .= "-";
}
$ret .= $s."'";
$ret .= ",'"