mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
60_Watches: countDownInit accept format <seconds> only
git-svn-id: https://svn.fhem.de/fhem/trunk@22038 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
625f473009
commit
8f2170d07a
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- feature: 60_Watches: countDownInit accept format <seconds> only
|
||||||
- bugfix: 98_RandomTimer: prevent irritations whith 78 or 4we,!$we timespecs;
|
- bugfix: 98_RandomTimer: prevent irritations whith 78 or 4we,!$we timespecs;
|
||||||
some PBP related changes.
|
some PBP related changes.
|
||||||
- bugfix: 73_AutoShuttersControl: fix Can't locate object method
|
- bugfix: 73_AutoShuttersControl: fix Can't locate object method
|
||||||
|
@ -71,6 +71,7 @@ BEGIN {
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
my %vNotesIntern = (
|
my %vNotesIntern = (
|
||||||
|
"0.24.0" => "26.05.2020 entry of countDownInit can be in format <seconds> ",
|
||||||
"0.23.2" => "20.05.2020 english commandref ",
|
"0.23.2" => "20.05.2020 english commandref ",
|
||||||
"0.23.1" => "10.05.2020 some more changes for PBP severity 3 ",
|
"0.23.1" => "10.05.2020 some more changes for PBP severity 3 ",
|
||||||
"0.23.0" => "10.05.2020 attr 'digitalBorderDistance' now also valid for digital watches, some changes for PBP ",
|
"0.23.0" => "10.05.2020 attr 'digitalBorderDistance' now also valid for digital watches, some changes for PBP ",
|
||||||
@ -216,7 +217,7 @@ sub Set { ## no critic 'compl
|
|||||||
$prop = ($prop ne "") ? $prop : 70; # Stunden
|
$prop = ($prop ne "") ? $prop : 70; # Stunden
|
||||||
$prop1 = ($prop1 ne "") ? $prop1 : 70; # Minuten
|
$prop1 = ($prop1 ne "") ? $prop1 : 70; # Minuten
|
||||||
$prop2 = ($prop2 ne "") ? $prop2 : 70; # Sekunden
|
$prop2 = ($prop2 ne "") ? $prop2 : 70; # Sekunden
|
||||||
return qq{The value for "$opt" is invalid. Use parameter "hh mm ss" like "19 45 13".} if($prop>24 || $prop1>59 || $prop2>59);
|
return qq{The value for "$opt" is invalid. Use parameter "hh mm ss" like "19 45 13".} if($prop>23 || $prop1>59 || $prop2>59);
|
||||||
|
|
||||||
my $at = sprintf("%02d",$prop).":".sprintf("%02d",$prop1).":".sprintf("%02d",$prop2);
|
my $at = sprintf("%02d",$prop).":".sprintf("%02d",$prop1).":".sprintf("%02d",$prop2);
|
||||||
|
|
||||||
@ -228,13 +229,19 @@ sub Set { ## no critic 'compl
|
|||||||
delReadings ($name, "alarmed");
|
delReadings ($name, "alarmed");
|
||||||
|
|
||||||
} elsif ($opt eq "countDownInit") {
|
} elsif ($opt eq "countDownInit") {
|
||||||
$prop = ($prop ne "") ? $prop : 70; # Stunden
|
my $ct;
|
||||||
$prop1 = ($prop1 ne "") ? $prop1 : 70; # Minuten
|
if($prop && $prop1) { # Format: hh mm ss
|
||||||
$prop2 = ($prop2 ne "") ? $prop2 : 70; # Sekunden
|
$prop2 = ($prop2 ne "") ? $prop2 : 70; # Sekunden
|
||||||
return qq{The value for "$opt" is invalid. Use parameter "hh mm ss" like "19 45 13".} if($prop>24 || $prop1>59 || $prop2>59);
|
return qq{The value for "$opt" is invalid. Use parameter "hh mm ss" like "19 45 13" \nor alternatively only one entry in seconds.} if($prop>23 || $prop1>59 || $prop2>59);
|
||||||
|
$ct = $prop*3600 + $prop1*60 + $prop2; # in Sekunden umgewandelt !
|
||||||
|
|
||||||
my $st = int(time*1000); # Millisekunden !
|
} elsif ($prop && !$prop1) { # Format: Sekundenangabe
|
||||||
my $ct = $prop*3600 + $prop1*60 + $prop2; # Sekunden !
|
$ct = $prop;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return qq{The value for "$opt" is invalid. Use parameter "hh mm ss" like "19 45 13" \nor alternatively only one entry in seconds.};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
delReadings ($name, "countInitVal");
|
delReadings ($name, "countInitVal");
|
||||||
|
|
||||||
@ -277,7 +284,7 @@ sub Set { ## no critic 'compl
|
|||||||
readingsSingleUpdate($hash, "state", "initialized", 1);
|
readingsSingleUpdate($hash, "state", "initialized", 1);
|
||||||
|
|
||||||
} elsif ($opt eq "time") {
|
} elsif ($opt eq "time") {
|
||||||
return qq{The value for "$opt" is invalid. Use parameter "hh mm ss" like "19 45 13".} if($prop>24 || $prop1>59 || $prop2>59);
|
return qq{The value for "$opt" is invalid. Use parameter "hh mm ss" like "19 45 13".} if($prop>23 || $prop1>59 || $prop2>59);
|
||||||
|
|
||||||
readingsBeginUpdate ($hash);
|
readingsBeginUpdate ($hash);
|
||||||
readingsBulkUpdate ($hash, "hour", $prop);
|
readingsBulkUpdate ($hash, "hour", $prop);
|
||||||
@ -2355,7 +2362,7 @@ As time source the client (browser time) as well as the FHEM server can be set
|
|||||||
|
|
||||||
<a name="alarmSet"></a>
|
<a name="alarmSet"></a>
|
||||||
<li><b>alarmSet <hh> <mm> <ss> </b><br>
|
<li><b>alarmSet <hh> <mm> <ss> </b><br>
|
||||||
Sets the alarm time in the format hh hours (24), mm minutes and ss seconds. <br>
|
Sets the alarm time in the format hh hours, mm minutes and ss seconds. <br>
|
||||||
If the time reaches the defined value, an event of the reading "alarmed" is triggered. <br>
|
If the time reaches the defined value, an event of the reading "alarmed" is triggered. <br>
|
||||||
This set command is only available for digital stopwatches. <br><br>
|
This set command is only available for digital stopwatches. <br><br>
|
||||||
|
|
||||||
@ -2376,13 +2383,15 @@ As time source the client (browser time) as well as the FHEM server can be set
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a name="countDownInit"></a>
|
<a name="countDownInit"></a>
|
||||||
<li><b>countDownInit <hh> <mm> <ss> </b><br>
|
<li><b>countDownInit <hh> <mm> <ss> | <seconds> </b><br>
|
||||||
Sets the start time of a countdown stopwatch with hh hours(24), mm minutes and ss seconds. <br>
|
Sets the start time of a countdown stopwatch.
|
||||||
|
The format can be <hh> hours, <mm> minutes and <ss> seconds or alternatively only one entry in seconds. <br>
|
||||||
This set command is only available with a digital countdown stopwatch. <br><br>
|
This set command is only available with a digital countdown stopwatch. <br><br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<b>Example</b> <br>
|
<b>Examples</b> <br>
|
||||||
set <name> countDownInit 0 30 10
|
set <name> countDownInit 0 30 10 <br>
|
||||||
|
set <name> countDownInit 3600
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@ -2448,7 +2457,7 @@ As time source the client (browser time) as well as the FHEM server can be set
|
|||||||
|
|
||||||
<a name="time"></a>
|
<a name="time"></a>
|
||||||
<li><b>time <hh> <mm> <ss> </b><br>
|
<li><b>time <hh> <mm> <ss> </b><br>
|
||||||
Sets a static time display with hh hours(24), mm minutes and ss seconds. <br>
|
Sets a static time display with hh hours, mm minutes and ss seconds. <br>
|
||||||
This set command is only available for a digital clock with static time display. <br><br>
|
This set command is only available for a digital clock with static time display. <br><br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@ -2765,7 +2774,7 @@ Als Zeitquelle können sowohl der Client (Browserzeit) als auch der FHEM-Server
|
|||||||
|
|
||||||
<a name="alarmSet"></a>
|
<a name="alarmSet"></a>
|
||||||
<li><b>alarmSet <hh> <mm> <ss> </b><br>
|
<li><b>alarmSet <hh> <mm> <ss> </b><br>
|
||||||
Setzt die Alarmzeit im Format hh-Stunden(24), mm-Minuten und ss-Sekunden. <br>
|
Setzt die Alarmzeit im Format hh-Stunden, mm-Minuten und ss-Sekunden. <br>
|
||||||
Erreicht die Zeit den definierten Wert, wird ein Event des Readings "alarmed" ausgelöst. <br>
|
Erreicht die Zeit den definierten Wert, wird ein Event des Readings "alarmed" ausgelöst. <br>
|
||||||
Dieses Set-Kommando ist nur bei digitalen Stoppuhren vorhanden. <br><br>
|
Dieses Set-Kommando ist nur bei digitalen Stoppuhren vorhanden. <br><br>
|
||||||
|
|
||||||
@ -2786,13 +2795,15 @@ Als Zeitquelle können sowohl der Client (Browserzeit) als auch der FHEM-Server
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a name="countDownInit"></a>
|
<a name="countDownInit"></a>
|
||||||
<li><b>countDownInit <hh> <mm> <ss> </b><br>
|
<li><b>countDownInit <hh> <mm> <ss> | <Sekunden> </b><br>
|
||||||
Setzt die Startzeit einer CountDown-Stoppuhr mit hh-Stunden(24), mm-Minuten und ss-Sekunden. <br>
|
Setzt die Startzeit einer CountDown-Stoppuhr.
|
||||||
|
Das Format kann sein <hh> Stunden, <mm> Minuten und <ss> Sekunden oder alternativ nur eine Angabe in Sekunden. <br>
|
||||||
Dieses Set-Kommando ist nur bei einer digitalen CountDown-Stoppuhr vorhanden. <br><br>
|
Dieses Set-Kommando ist nur bei einer digitalen CountDown-Stoppuhr vorhanden. <br><br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<b>Beispiel</b> <br>
|
<b>Beispiel</b> <br>
|
||||||
set <name> countDownInit 0 30 10
|
set <name> countDownInit 0 30 10 <br>
|
||||||
|
set <name> countDownInit 3600
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@ -2858,7 +2869,7 @@ Als Zeitquelle können sowohl der Client (Browserzeit) als auch der FHEM-Server
|
|||||||
|
|
||||||
<a name="time"></a>
|
<a name="time"></a>
|
||||||
<li><b>time <hh> <mm> <ss> </b><br>
|
<li><b>time <hh> <mm> <ss> </b><br>
|
||||||
Setzt eine statische Zeitanzeige mit hh-Stunden(24), mm-Minuten und ss-Sekunden. <br>
|
Setzt eine statische Zeitanzeige mit hh-Stunden, mm-Minuten und ss-Sekunden. <br>
|
||||||
Dieses Set-Kommando ist nur bei einer Digitaluhr mit statischer Zeitanzeige vorhanden. <br><br>
|
Dieses Set-Kommando ist nur bei einer Digitaluhr mit statischer Zeitanzeige vorhanden. <br><br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user