mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 04:36:36 +00:00
98_RandomTimer: new attriute forceStoptimeSameDay to force stopping time of RT the same day.
git-svn-id: https://svn.fhem.de/fhem/trunk@14538 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9d122c6a54
commit
ab7a49e8e4
@ -50,7 +50,7 @@ sub RandomTimer_Initialize($)
|
||||
$hash->{DefFn} = "RandomTimer_Define";
|
||||
$hash->{UndefFn} = "RandomTimer_Undef";
|
||||
$hash->{AttrFn} = "RandomTimer_Attr";
|
||||
$hash->{AttrList} = "onCmd offCmd switchmode disable:0,1 disableCond runonce:0,1 keepDeviceAlive ".
|
||||
$hash->{AttrList} = "onCmd offCmd switchmode disable:0,1 disableCond runonce:0,1 keepDeviceAlive forceStoptimeSameDay ".
|
||||
$readingFnAttributes;
|
||||
}
|
||||
########################################################################
|
||||
@ -385,8 +385,11 @@ sub RandomTimer_stopZeitErmitteln ($$) {
|
||||
} else {
|
||||
$stopTime = RandomTimer_zeitBerechnen($now, $hour, $min, $sec);
|
||||
}
|
||||
if ($hash->{helper}{startTime} > $stopTime) {
|
||||
$stopTime = RandomTimer_addDays($stopTime, 1);
|
||||
|
||||
if (!AttrVal($hash->{NAME}, "forceStoptimeSameDay", 0)) {
|
||||
if ($hash->{helper}{startTime} > $stopTime) {
|
||||
$stopTime = RandomTimer_addDays($stopTime, 1);
|
||||
}
|
||||
}
|
||||
$hash->{helper}{stopTime} = $stopTime;
|
||||
$hash->{helper}{STOPTIME} = strftime("%d.%m.%Y %H:%M:%S",localtime($stopTime));
|
||||
|
Loading…
x
Reference in New Issue
Block a user