From 79cc79923fba19f558f4ff3c40b7ec7a56e15621 Mon Sep 17 00:00:00 2001
From: Beta-User <>
Date: Sun, 15 Mar 2020 17:07:48 +0000
Subject: [PATCH] 98_WeekdayTimer: bugfix wrt. to weekprofile changes #109164
and #108820
git-svn-id: https://svn.fhem.de/fhem/trunk@21430 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/CHANGED | 1 +
fhem/FHEM/98_WeekdayTimer.pm | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/fhem/CHANGED b/fhem/CHANGED
index 537fab2b6..b1c5ff412 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -1,5 +1,6 @@
# 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.
+ - bugfix: 98_WeekdayTimer: prevent crashes related to weekprofile changes
- bugfix: 93_DbRep: fix user rights check for index operation
- bugfix: 73_AutoShuttersControl: fix SleepPos conditions in residents
and roommates Fn
diff --git a/fhem/FHEM/98_WeekdayTimer.pm b/fhem/FHEM/98_WeekdayTimer.pm
index 754093782..300d117be 100644
--- a/fhem/FHEM/98_WeekdayTimer.pm
+++ b/fhem/FHEM/98_WeekdayTimer.pm
@@ -71,6 +71,10 @@ sub WeekdayTimer_Define($$) {
$hash->{NAME} = $name;
$hash->{DEVICE} = $device;
my $language = WeekdayTimer_Language ($hash, \@a);
+
+ if ($def =~ /weekprofile/gm) {
+ addToDevAttrList($name, "weekprofile");
+ }
InternalTimer(time(), "WeekdayTimer_Start",$hash,0);
@@ -178,6 +182,7 @@ sub WeekdayTimer_Set($@) {
} elsif ($v =~ /weekprofile ([^: ]+):([^:]+):([^: ]+)\b/) {
Log3 $hash, 3, "[$name] set $name $v";
return unless WeekdayTimer_UpdateWeekprofileReading($hash, $1, $2, $3);
+ WeekdayTimer_DeleteTimer($hash);
WeekdayTimer_Start($hash);
}
return undef;
@@ -1444,7 +1449,8 @@ sub WeekdayTimer_GetWeekprofileReadingTriplett($$) {
set myWeekprofiles send_to_device holiday:livingrooms wd