mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-17 23:46:03 +00:00
RESIDENTStk.pm: circumvent wakeuptimer recalculation in at-device after FHEM reboot (Forum #56706)
git-svn-id: https://svn.fhem.de/fhem/trunk@12011 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
eb8cfe7c39
commit
2d28389009
@ -870,9 +870,20 @@ sub RESIDENTStk_wakeupGetBegin($;$) {
|
|||||||
my $wakeupOffset = AttrVal( $NAME, "wakeupOffset", 0 );
|
my $wakeupOffset = AttrVal( $NAME, "wakeupOffset", 0 );
|
||||||
my $wakeupTime;
|
my $wakeupTime;
|
||||||
|
|
||||||
if ($atDeviceName) {
|
if ($wakeupAtdevice) {
|
||||||
Log3 $NAME, 4,
|
|
||||||
"RESIDENTStk $NAME: RESIDENTStk_wakeupGetBegin() run by at-device $atDeviceName";
|
# let at-device recalculate after global:INITIALIZED event
|
||||||
|
# as $nextRun can only be undef at that stage
|
||||||
|
if ( !$init_done ) {
|
||||||
|
Log3 $NAME, 4, "RESIDENTStk $NAME: Waiting for FHEM initialization to recalculate Wakeuptime";
|
||||||
|
InternalTimer( 1, RESIDENTStk_wakeupGetBegin,
|
||||||
|
( $NAME, $wakeupAtdevice ), 0 );
|
||||||
|
return "05:00";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Log3 $NAME, 4,
|
||||||
|
"RESIDENTStk $NAME: Wakeuptime recalculation triggered by at-device $wakeupAtdevice";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# just give any valuable return to at-device
|
# just give any valuable return to at-device
|
||||||
|
Loading…
x
Reference in New Issue
Block a user