From f6cf30198cf510bc6d277432991c1a87601733c1 Mon Sep 17 00:00:00 2001 From: jamesgo <> Date: Tue, 22 Dec 2020 11:20:05 +0000 Subject: [PATCH] 94_PWM.pm : fix maxOffTime not working when using usePID=0 git-svn-id: https://svn.fhem.de/fhem/trunk@23402 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/94_PWM.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/94_PWM.pm b/fhem/FHEM/94_PWM.pm index b94ba938a..23bef1fba 100644 --- a/fhem/FHEM/94_PWM.pm +++ b/fhem/FHEM/94_PWM.pm @@ -36,6 +36,7 @@ # 05.03.19 GA fix reading maxOffTimeCalculation was set but not used # 30.12.19 GA fix access to ReadingsVal via $name (reported by stromer-12) # 26.05.20 GA fix division by zero if minRoomsOn is >0 and roomsCounted is zero +# 22.12.20 GA fix maxOffTime for P calculation never activated ############################################## # $Id$ @@ -901,7 +902,7 @@ PWM_CalcRoom(@) return ("on", $newpulse, $cycletime, $actorV); } - if ($newpulse == 0) { + if ($newpulse == 0 or ($maxOffTimeApply > 0 and $room->{c_PID_useit} eq 0)) { # ---------------- # check if maxOffTime protection is activated (attribute maxOffTimeIdlePeriod is set)