2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +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 $alarmhiddenroom = "AlarmRoom"; # hidden room
my $alarmpublicroom = "Alarm"; # public room my $alarmpublicroom = "Alarm"; # public room
my $alarmno = 8; my $alarmno = 8;
my $alarmversion = "4.03"; my $alarmversion = "4.05";
my %alarm_transtable_EN = ( my %alarm_transtable_EN = (
"ok" => "OK", "ok" => "OK",
@ -270,7 +270,6 @@ sub Alarm_transform($){
if( $md==1 ); if( $md==1 );
} }
######################################################################################### #########################################################################################
# #
# Alarm_Undef - Implements Undef function # Alarm_Undef - Implements Undef function
@ -510,11 +509,10 @@ sub Alarm_escape($$){
sub Alarm_save($) { sub Alarm_save($) {
my ($hash) = @_; my ($hash) = @_;
my $date = localtime(time); my $date = TimeNow();
$hash->{DATA}{"savedate"} = $date; $hash->{DATA}{"savedate"} = $date;
readingsSingleUpdate( $hash, "savedate", $hash->{DATA}{"savedate"}, 1 ); readingsSingleUpdate( $hash, "savedate", $date, 1 );
my $json = JSON->new->utf8; my $jhash0 = toJSON($hash->{DATA});
my $jhash0 = eval{ $json->encode( $hash->{DATA} ) };
my $error = FileWrite("AlarmFILE",$jhash0); my $error = FileWrite("AlarmFILE",$jhash0);
#Log 1,"[Alarm_save] error=$error"; #Log 1,"[Alarm_save] error=$error";
return; return;
@ -1271,6 +1269,8 @@ sub Alarm_Html($)
$al .= $i.","; $al .= $i.",";
$at .= $s.","; $at .= $s.",";
} }
}else{
$detailstate .= "-";
} }
$ret .= $s."'"; $ret .= $s."'";
$ret .= ",'" $ret .= ",'"