From 69adf7d82975e700094a30e6df8a6ab1491e21f4 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Mon, 4 May 2020 16:27:18 +0000 Subject: [PATCH] 60_Watches: contrib 0.15.1 git-svn-id: https://svn.fhem.de/fhem/trunk@21864 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/60_Watches.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fhem/contrib/DS_Starter/60_Watches.pm b/fhem/contrib/DS_Starter/60_Watches.pm index 44fb19dbd..05becaef3 100644 --- a/fhem/contrib/DS_Starter/60_Watches.pm +++ b/fhem/contrib/DS_Starter/60_Watches.pm @@ -72,6 +72,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "0.15.1" => "04.05.2020 fix permanently events when no alarmTime is set in countdownwatch and countdown is finished ", "0.15.0" => "04.05.2020 new attribute 'digitalSegmentType' for different segement count, also new attributes ". "'digitalDigitAngle', 'digitalDigitDistance', 'digitalDigitHeight', 'digitalDigitWidth', 'digitalSegmentDistance' ". "'digitalSegmentWidth', stopwatches don't stop when alarm is triggered (use notify to do it) ", @@ -177,14 +178,15 @@ sub Set { ## no critic 'compl my $prop2 = $a[4]; my $prop3 = $a[5]; my $model = $hash->{MODEL}; - my $addp = AttrVal($name,"digitalDisplayPattern","watch"); + my $addp = AttrVal($name, "digitalDisplayPattern", "watch"); - return if(IsDisabled($name) || $addp !~ /stopwatch|staticwatch|countdownwatch/); + return if(IsDisabled($name) || $addp !~ /watch/); my $setlist = "Unknown argument $opt, choose one of "; $setlist .= "time " if($addp =~ /staticwatch/); $setlist .= "alarmHMSset alarmHMSdel:noArg reset:noArg resume:noArg start:noArg stop:noArg " if($addp =~ /stopwatch|countdownwatch/); - $setlist .= "countDownInit " if($addp =~ /countdownwatch/); + $setlist .= "countDownInit " if($addp =~ /countdownwatch/); + $setlist .= "alarmHMSset alarmHMSdel:noArg " if($addp =~ /\bwatch\b/); if ($opt =~ /\bstart\b/) { return qq{Please set "countDownInit" before !} if($addp =~ /countdownwatch/ && !ReadingsVal($name, "countInitVal", "")); @@ -386,7 +388,7 @@ sub digitalWatch { my $addd = AttrVal($d, "digitalDigitDistance", 2); my $adsd = AttrVal($d, "digitalSegmentDistance", 0.5); my $adda = AttrVal($d, "digitalDigitAngle", 9); - my $alarm = " ".ReadingsVal($d, "alarmTime", $alarmdef); + my $alarm = " ".ReadingsVal($d, "alarmTime", "aa:bb:cc"); my $ddp = "###:##:##"; # dummy my ($h,$m,$s) = (0,0,0); @@ -1044,7 +1046,7 @@ sub digitalWatch { // Check ob Alarm ausgelöst werden soll und ggf. Alarmevent triggern function checkAndDoAlm (acttime) { - lastalmtime = localStorage.getItem('lastalmtime_$d'); // letzte Alarmzeit laden + lastalmtime = localStorage.getItem('lastalmtime_$d'); // letzte Alarmzeit laden if ( (acttime == '$alarm' || acttime == ' $alarmdef') && acttime != lastalmtime ) { command = '{ CommandSetReading(undef, \"$d alarmed '+acttime+'\") }'; url_$d = makeCommand(command);