2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 17:26:34 +00:00

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:
nasseeder1 2020-05-04 16:27:18 +00:00
parent 1e18cd983c
commit 69adf7d829

View File

@ -72,6 +72,7 @@ BEGIN {
# Versions History intern # Versions History intern
my %vNotesIntern = ( 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 ". "0.15.0" => "04.05.2020 new attribute 'digitalSegmentType' for different segement count, also new attributes ".
"'digitalDigitAngle', 'digitalDigitDistance', 'digitalDigitHeight', 'digitalDigitWidth', 'digitalSegmentDistance' ". "'digitalDigitAngle', 'digitalDigitDistance', 'digitalDigitHeight', 'digitalDigitWidth', 'digitalSegmentDistance' ".
"'digitalSegmentWidth', stopwatches don't stop when alarm is triggered (use notify to do it) ", "'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 $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 "; my $setlist = "Unknown argument $opt, choose one of ";
$setlist .= "time " if($addp =~ /staticwatch/); $setlist .= "time " if($addp =~ /staticwatch/);
$setlist .= "alarmHMSset alarmHMSdel:noArg reset:noArg resume:noArg start:noArg stop:noArg " if($addp =~ /stopwatch|countdownwatch/); $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/) { if ($opt =~ /\bstart\b/) {
return qq{Please set "countDownInit" before !} if($addp =~ /countdownwatch/ && !ReadingsVal($name, "countInitVal", "")); 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 $addd = AttrVal($d, "digitalDigitDistance", 2);
my $adsd = AttrVal($d, "digitalSegmentDistance", 0.5); my $adsd = AttrVal($d, "digitalSegmentDistance", 0.5);
my $adda = AttrVal($d, "digitalDigitAngle", 9); my $adda = AttrVal($d, "digitalDigitAngle", 9);
my $alarm = " ".ReadingsVal($d, "alarmTime", $alarmdef); my $alarm = " ".ReadingsVal($d, "alarmTime", "aa:bb:cc");
my $ddp = "###:##:##"; # dummy my $ddp = "###:##:##"; # dummy
my ($h,$m,$s) = (0,0,0); my ($h,$m,$s) = (0,0,0);