60_Watches: contrib 0.15.1

git-svn-id: https://svn.fhem.de/fhem/trunk@21864 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
DS_Starter
2020-05-04 16:27:18 +00:00
parent c4453c9352
commit e0af48ab5e

View File

@@ -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) ",
@@ -179,12 +180,13 @@ sub Set { ## no critic 'compl
my $model = $hash->{MODEL};
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 .= "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);