2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 01:09:47 +00:00

98_WeekdayTimer.pm: prevent reboot loop in case of open window and changed weekprofile, forum #112751

git-svn-id: https://svn.fhem.de/fhem/trunk@22373 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2020-07-09 18:12:29 +00:00
parent 678b9ed2c9
commit 2bf4e74369

View File

@ -86,6 +86,8 @@ sub WeekdayTimer_Undef {
for my $idx (keys %{$hash->{profil}}) {
WeekdayTimer_RemoveInternalTimer($idx, $hash);
}
WeekdayTimer_RemoveInternalTimer($hash->{VERZOEGRUNG_IDX},$hash) if defined ($hash->{VERZOEGRUNG_IDX});
delete $modules{$hash->{TYPE}}{defptr}{$hash->{NAME}};
return WeekdayTimer_RemoveInternalTimer("SetTimerOfDay", $hash);
}
@ -95,11 +97,14 @@ sub WeekdayTimer_Start {
my $hash = shift // return;
my $name = $hash->{NAME};
my $def = $hash->{DEF};
WeekdayTimer_RemoveInternalTimer($hash->{VERZOEGRUNG_IDX},$hash) if defined ($hash->{VERZOEGRUNG_IDX});
my @arr = split m{\s+}xms, $def;
my $device = shift @arr;
my $language = WeekdayTimer_Language ($hash, \@arr);
$hash->{CONDITION} = "";
$hash->{COMMAND} = "";
my $idx = 0;
$hash->{'.dayNumber'} = {map {$_ => $idx++} @{$hash->{'.shortDays'}{$language}}};
@ -127,8 +132,6 @@ sub WeekdayTimer_Start {
$modules{$hash->{TYPE}}{defptr}{$hash->{NAME}} = $hash;
$hash->{CONDITION} = "";
$hash->{COMMAND} = "";
if($conditionOrCommand =~ m{\A\(.*\)\z}xms) { #condition (*)
$hash->{CONDITION} = $conditionOrCommand;
} elsif(length($conditionOrCommand) > 0 ) {