mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +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/fhem@22373 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ab0bbcec9c
commit
5e4d7e8c14
@ -86,6 +86,8 @@ sub WeekdayTimer_Undef {
|
|||||||
for my $idx (keys %{$hash->{profil}}) {
|
for my $idx (keys %{$hash->{profil}}) {
|
||||||
WeekdayTimer_RemoveInternalTimer($idx, $hash);
|
WeekdayTimer_RemoveInternalTimer($idx, $hash);
|
||||||
}
|
}
|
||||||
|
WeekdayTimer_RemoveInternalTimer($hash->{VERZOEGRUNG_IDX},$hash) if defined ($hash->{VERZOEGRUNG_IDX});
|
||||||
|
|
||||||
delete $modules{$hash->{TYPE}}{defptr}{$hash->{NAME}};
|
delete $modules{$hash->{TYPE}}{defptr}{$hash->{NAME}};
|
||||||
return WeekdayTimer_RemoveInternalTimer("SetTimerOfDay", $hash);
|
return WeekdayTimer_RemoveInternalTimer("SetTimerOfDay", $hash);
|
||||||
}
|
}
|
||||||
@ -95,11 +97,14 @@ sub WeekdayTimer_Start {
|
|||||||
my $hash = shift // return;
|
my $hash = shift // return;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my $def = $hash->{DEF};
|
my $def = $hash->{DEF};
|
||||||
|
WeekdayTimer_RemoveInternalTimer($hash->{VERZOEGRUNG_IDX},$hash) if defined ($hash->{VERZOEGRUNG_IDX});
|
||||||
my @arr = split m{\s+}xms, $def;
|
my @arr = split m{\s+}xms, $def;
|
||||||
my $device = shift @arr;
|
my $device = shift @arr;
|
||||||
|
|
||||||
my $language = WeekdayTimer_Language ($hash, \@arr);
|
my $language = WeekdayTimer_Language ($hash, \@arr);
|
||||||
|
|
||||||
|
$hash->{CONDITION} = "";
|
||||||
|
$hash->{COMMAND} = "";
|
||||||
|
|
||||||
my $idx = 0;
|
my $idx = 0;
|
||||||
$hash->{'.dayNumber'} = {map {$_ => $idx++} @{$hash->{'.shortDays'}{$language}}};
|
$hash->{'.dayNumber'} = {map {$_ => $idx++} @{$hash->{'.shortDays'}{$language}}};
|
||||||
@ -127,8 +132,6 @@ sub WeekdayTimer_Start {
|
|||||||
|
|
||||||
$modules{$hash->{TYPE}}{defptr}{$hash->{NAME}} = $hash;
|
$modules{$hash->{TYPE}}{defptr}{$hash->{NAME}} = $hash;
|
||||||
|
|
||||||
$hash->{CONDITION} = "";
|
|
||||||
$hash->{COMMAND} = "";
|
|
||||||
if($conditionOrCommand =~ m{\A\(.*\)\z}xms) { #condition (*)
|
if($conditionOrCommand =~ m{\A\(.*\)\z}xms) { #condition (*)
|
||||||
$hash->{CONDITION} = $conditionOrCommand;
|
$hash->{CONDITION} = $conditionOrCommand;
|
||||||
} elsif(length($conditionOrCommand) > 0 ) {
|
} elsif(length($conditionOrCommand) > 0 ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user