From fa66d480b4de60310c9a242c9f2cc2db605c2f28 Mon Sep 17 00:00:00 2001 From: jamesgo <> Date: Sun, 13 Mar 2022 01:30:21 +0000 Subject: [PATCH] 93_PWMR.pm : Fix startup Fehler mit Attribut desiredTempFrom git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@25820 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/93_PWMR.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/FHEM/93_PWMR.pm b/FHEM/93_PWMR.pm index 5e186c225..fd0049298 100644 --- a/FHEM/93_PWMR.pm +++ b/FHEM/93_PWMR.pm @@ -63,6 +63,7 @@ # add clear PID helper structure when PWM or PWMR object gets disabled # 31.01.21 GA fix wrong time logged for "desired-temp was manualy set until" # 02.02.21 GA fix handle access to not yet defined iodev on startup +# 13.03.22 GA fix handle error in attr desiredTempFrom when device is not yet defined during startup # module for PWM (Pulse Width Modulation) calculation # this module defines a room for calculation @@ -1644,7 +1645,12 @@ PWMR_Attr(@) # check if device exist unless (defined($defs{$hash->{d_name}})) { - return "error: $hash->{d_name} does not exist."; + my $msg = "error: $hash->{d_name} does not exist."; + if ($init_done == 1) { + return $msg; + } else { # during startup only log error because device maybe defined later + Log3 ($hash, 3, "PWMR_Attr desiredTempFrom $msg (maybe defined later)"); + } } PWMR_NormalizeRules($hash);